Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open command docs updation #538

Merged
merged 9 commits into from
Aug 11, 2024

Conversation

sambhavnoobcoder
Copy link
Contributor

@sambhavnoobcoder sambhavnoobcoder commented Aug 10, 2024

Description

Updated the documentation to correctly reflect the changes in the open command implementation

Changes

  • added the docs for the -e flag
  • added the section for editor configurations
  • added note to indicate deprecation of the previous implementation of the open command

Objective

added sections for the open command describing the use cases and the changes to the open command , enabling the newer ways to use it
Copy link

vercel bot commented Aug 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
documentation ✅ Ready (Inspect) Visit Preview Aug 10, 2024 10:52pm

@@ -73,12 +73,22 @@ pieces list models
```

### `open`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The open command should be deprecated the e flag online works in the list command now

Copy link
Contributor

@Bishoy-at-pieces Bishoy-at-pieces Aug 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we here say
###open (deprecated)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in the commit 36435e3 commit . also just to be sure , I think you meant #### open (deprecated) instead of ###open (deprecated) . if not , then I'll make the change exactly as suggested .

added deprecate alongside open in the docs as suggested .

```pieces config editor <editor_command>```

#### NOTE : previous implementations of the open command are now deprecated.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use either of the following rather than having NOTE:

Info Admonition. We use these all across the docs and its a nice way to show some extra info about something.

or

Just have the link be this: > Previous implementations of the open command are now deprecated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

used the second suggestion in commit 94e8b7a

```

```-e``` is an optional flag . It Opens the asset in the configured external editor. Editor of choice can be configured using config command.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The e flag work in the list not in the open
It is list assets -e to open the asset in the editor

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it . fixed the change in commit 52568c5

changes :
- open is now ### not #### , i.e , h3 not h4 
- open is now written with back ticks , retaining them as it used to earlier
- Removed Note implementation 
- Added the ```>``` version to address the note message from earlier .
earlier described in the open command , the editor opening is actually a flag of the list assets command , so that has been replaced , refactored and rewritten correctly .
### `open`
Opens an asset from a list or search. If only "open" is used, it opens the most recent asset.
### `open` (deprecated)
Opens an asset from a list or search. If only "open" is used, it opens the most recent asset. This also creates a link to the asset's code.

```bash
pieces open [ITEM_INDEX]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we here give some examples on the editor_command?
I am not sure what is the editor_command means here in that context you can say eg: code to open vs code or subl to open sublime etc.....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in 71304ba commit


```bash
pieces open [ITEM_INDEX]
```

##### Editor Configuration:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you could also update this to be an h4 that would be great!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup , that should have always been h4 , apologies for the typo , fixed in commit 9e734b5

added a few examples of how to setup and work with the editor_command , including code , vim , sublime , emacs , nano etc .
turned the editor config from h5 to h4
Copy link
Contributor

@Bishoy-at-pieces Bishoy-at-pieces left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@mason-at-pieces mason-at-pieces left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mason-at-pieces mason-at-pieces merged commit b8362e7 into pieces-app:main Aug 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: open command
3 participants