-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
feat(broot): add broot spec #1648
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
Conversation
Overviewsrc/broot.ts:Info:src/br.ts:Info: |
Hello @Pooja444,
Please add a 👍 as a reaction to this comment to show that you read this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Pooja444 thank you for the PR! Beautifully done.
This is embarrassing: I ran broot --help
instead of looking at the man-page and... there's actually a bunch more options that I didn't know about 🤦 Would you be able to add those?
If you're short on time, I'm happy to land this PR as-is and we can add the rest later. What you've got is perfect and would be ready to merge.
broot 1.16.0
dystroy <denys.seguret@gmail.com>
A tree explorer and a customizable launcher
Complete documentation lives at https://dystroy.org/broot"
USAGE:
broot [OPTIONS] [FILE]
ARGS:
<FILE>
Root Directory
OPTIONS:
-c, --cmd <CMD>
Semicolon separated commands to execute
--color <COLOR>
Whether to have styles and colors (auto is default and usually OK)
[default: auto]
[possible values: auto, yes, no]
--conf <CONF>
Semicolon separated paths to specific config files"),
-d, --dates
Show the last modified date of files and directories"
-D, --no-dates
Don't show the last modified date"
-f, --only-folders
Only show folders
-F, --no-only-folders
Show folders and files alike
-g, --show-git-info
Show git statuses on files and stats on repo
-G, --no-show-git-info
Don't show git statuses on files and stats on repo
--get-root
Ask for the current root of the remote broot
--git-status
Only show files having an interesting git status, including hidden ones
-h, --hidden
Show hidden files
-H, --no-hidden
Don't show hidden files
--height <HEIGHT>
Height (if you don't want to fill the screen or for file export)
--help
Print help information
-i, --git-ignored
Show git ignored files
-I, --no-git-ignored
Don't show git ignored files
--install
Install or reinstall the br shell function
--listen <LISTEN>
A socket to listen to for commands
--no-sort
Don't sort
--outcmd <OUTCMD>
Where to write the produced cmd (if any)
-p, --permissions
Show permissions
-P, --no-permissions
Don't show permissions
--print-shell-function <PRINT_SHELL_FUNCTION>
Print to stdout the br function for a given shell
-s, --sizes
Show the size of files and directories
-S, --no-sizes
Don't show sizes
--send <SEND>
A socket that broot sends commands to before quitting
--set-install-state <SET_INSTALL_STATE>
Where to write the produced cmd (if any)
[possible values: undefined, refused, installed]
--show-root-fs
Show filesystem info on top
--sort-by-count
Sort by count (only show one level of the tree)
--sort-by-date
Sort by date (only show one level of the tree)
--sort-by-size
Sort by size (only show one level of the tree)
--sort-by-type
Same as sort-by-type-dirs-first
--sort-by-type-dirs-first
Sort by type, directories first (only show one level of the tree)
--sort-by-type-dirs-last
Sort by type, directories last (only show one level of the tree)
-t, --trim-root
Trim the root too and don't show a scrollbar
-T, --no-trim-root
Don't trim the root level, show a scrollbar
-V, --version
Print version information
-w, --whale-spotting
Sort by size, show ignored and hidden files
--write-default-conf <WRITE_DEFAULT_CONF>
Write default conf files in given directory
@separaterecords oh hahhhaha I had no idea! Sorry I missed that, I'll add it tomorrow morning (Pacific time zone) and update the PR asap, does that sound good? 🙂 |
Sounds great to me! No rush at all. Thank you again for working on this! |
(and sorry for not checking this beforehand!) |
@separaterecords I have added the rest of the options and args, please let me know if it looks good, thanks a lot! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR, it looks great! Can you address the comments please?
src/broot.ts
Outdated
{ | ||
name: ["--dates", "-d"], | ||
description: "Show the last modified date of files and directories", | ||
}, | ||
{ | ||
name: ["--no-dates", "-D"], | ||
description: "Don't show the last modified date", | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are mutually exclusiveOn
. Same for all the other options that has a --
and a --no-
version. Can you add that property?
name: ["--out", "-o"], | ||
description: "Where to write the produced path, if any", | ||
args: { | ||
name: "file-export-path", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: "file-export-path", | |
name: "file-export-path", | |
template: "filepaths", | |
suggestCurrentToken: true, |
Thanks for your suggestions @fedeci! I have updated my pull request as per your comments, please review and let me know if it looks good |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you @Pooja444 🙂
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
New spec for
broot
What is the current behavior? (You can also link to an open issue here)
Missing spec for
broot
(closes #1526)What is the new behavior (if this is a feature change)?
Add spec for
broot
Additional info:
npm run test
andnpm run lint:fix
before raising PR