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

feat(completions): add basic nushell completion file #456

Merged
merged 3 commits into from
Oct 2, 2023

Conversation

gierens
Copy link
Member

@gierens gierens commented Oct 2, 2023

This adds an initial nushell completion file generated with https://github.com/dscottboggs/nu-completions from our fish completions ... I had to remove a few things to make it work. The script doesn't like \ and multiline strings. Maybe we can add those manually after verifying that this at least works.

Resolves #254

@gierens gierens requested review from cafkafk and PThorpe92 October 2, 2023 12:37
Copy link
Member

@cafkafk cafkafk left a comment

Choose a reason for hiding this comment

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

you should add pthorpe to the codeowners file for nushell completions

@gierens gierens requested a review from cafkafk October 2, 2023 12:43
@cafkafk
Copy link
Member

cafkafk commented Oct 2, 2023

Let's be nice and make sure @PThorpe92 is okay with this lol

PThorpe92
PThorpe92 previously approved these changes Oct 2, 2023
Comment on lines 2 to 49
--version(-v) # Show version of eza
--help(-?) # Show list of command-line options
--oneline(-1) # Display one entry per line
--long(-l) # Display extended file metadata as a table
--grid(-G) # Display entries in a grid
--across(-x) # Sort the grid across, rather than downwards
--recurse(-R) # Recurse into directories
--tree(-T) # Recurse into directories as a tree
--classify(-F) # Display type indicator by file names
--icons # Display icons
--no-icons # Don't display icons
--no-quotes # Don't quote file names with spaces
--hyperlink # Display entries as hyperlinks
--group-directories-first # Sort directories before other files
--git-ignore # Ignore files mentioned in '.gitignore'
--all(-a) # Show hidden and 'dot' files. Use this twice to also show the '.' and '..' directories
--list-dirs(-d) # List directories like regular files
--level(-L): string # Limit the depth of recursion
--width(-w) # Limits column output of grid, 0 implies auto-width
--reverse(-r) # Reverse the sort order
--only-dirs(-D) # List only directories
--only-files(-f) # List only files
--binary(-b) # List file sizes with binary prefixes
--bytes(-B) # List file sizes in bytes, without any prefixes
--group(-g) # List each file's group
--header(-h) # Add a header row to each column
--links(-H) # List each file's number of hard links
--inode(-i) # List each file's inode number
--blocksize(-S) # List each file's size of allocated file system blocks
--dereference(-X) # dereference symlinks for file information
--modified(-m) # Use the modified timestamp field
--numeric(-n) # List numeric user and group IDs.
--changed # Use the changed timestamp field
--accessed(-u) # Use the accessed timestamp field
--created(-U) # Use the created timestamp field
--no-permissions # Suppress the permissions field
--octal-permissions(-o) # List each file's permission in octal format
--no-filesize # Suppress the filesize field
--no-user # Suppress the user field
--no-time # Suppress the time field
--mounts(-M) # Show mount details
--git # List each file's Git status, if tracked
--no-git # Suppress Git status
--git-repos # List each git-repos status and branch name
--git-repos-no-status # List each git-repos branch name (much faster)
--extended(-@) # List each file's extended attributes and sizes
--context(-Z) # List each file's security context
]
Copy link
Member

Choose a reason for hiding this comment

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

We should probably align the comments

Copy link
Member

Choose a reason for hiding this comment

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

image
it auto aligns in your terminal when you use them. but yeah probably should still

Copy link
Member Author

Choose a reason for hiding this comment

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

that's a good point ... thought about that too

@daviessm
Copy link
Contributor

daviessm commented Oct 2, 2023

It might be a fun task for someone to add nushell to https://crates.io/crates/clap_complete so we can generate them all automatically once clap is done.

Edit: it already exists - https://crates.io/crates/clap_complete_nushell

@gierens
Copy link
Member Author

gierens commented Oct 2, 2023

It might be a fun task for someone to add nushell to https://crates.io/crates/clap_complete so we can generate them all automatically once clap is done.

Edit: it already exists - https://crates.io/crates/clap_complete_nushell

Uh, we definitely should check out clap's extesions once it's merged.

@daviessm
Copy link
Contributor

daviessm commented Oct 2, 2023

Uh, we definitely should check out clap's extesions once it's merged.

Yeah I'm hoping to do that off the back of #400

Signed-off-by: Christina Sørensen <[email protected]>
@cafkafk cafkafk marked this pull request as ready for review October 2, 2023 16:19
Copy link
Member

@cafkafk cafkafk left a comment

Choose a reason for hiding this comment

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

LGTM :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

feat: add nushell completions
4 participants