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

Feature: Improved CLI structure (single command w/ options) #78

Open
broofa opened this issue Sep 19, 2021 · 2 comments
Open

Feature: Improved CLI structure (single command w/ options) #78

broofa opened this issue Sep 19, 2021 · 2 comments

Comments

@broofa
Copy link

broofa commented Sep 19, 2021

The current CLI of s, g, d, l, and p takes up single-letter designations that many developers prefer to use for custom aliases. It is also unconventional, in that most *nix CLIs are a single command with option flags for the different actions.

This also causes forward-compatibility issues. For example, if #77 is implemented the current convention would argue for a c(leanup) command, but this may unexpectedly collide if someone already has a c alias or function.

Furthermore, the only action that really merits a single-letter designation is the g command [edit: sorry, I meant 'g', not 'c']. That's the only one that is used enough to warrant the single-letter shortcut. (Navigating to a directory occurs 100x more often than setting, listing, or deleting.)

Thus, I suggest switching the CLI to a single command (e.g. 'mark'), thusly:

Old New Comment
g mark (no options) aliased as g
s mark --set or mark -s
d mark --delete or mark -d
l mark --list or mark -l
p mark --print or mark -p
(new) mark --help or mark -h usage and help info
(new) mark --legacy Creates s, d, l, p aliases (which would not be configured by default)
(new) mark --clean or mark -c Cleanup. see #77
@Jirido
Copy link

Jirido commented Oct 11, 2021

I agree, but the functions can easily be renamed in the script, But again , I agreeiIt is better to set an alias, I have a conflict with alias s='pacman -S'

@chunkily
Copy link

I cobbled together something that tries to implement the suggestion above. No idea if it will work for everyone but it worked well enough in my own testing. https://github.com/chunkily/bashmarks

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

No branches or pull requests

3 participants