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 request: bd with no arguments should move up one directory #18

Open
mawkler opened this issue Mar 16, 2018 · 4 comments
Open

Feature request: bd with no arguments should move up one directory #18

mawkler opened this issue Mar 16, 2018 · 4 comments

Comments

@mawkler
Copy link

mawkler commented Mar 16, 2018

I think it would be nice if bd simply corresponds to doing cd .. or bd 1

@Tarrasch
Copy link
Owner

Tarrasch commented Mar 16, 2018

Not sure I like that idea. It would not be able to print a usage then right? Why not make your own alias alias up='cd ..'?

@extremepayne
Copy link

Right, since you can have a directory named -h it's impossible to implement a help flag. So I see why you're hesitant to implement this. But I feel like the two usages are so easy that they should be self-explanatory. Generally, I feel like a help page isn't super necessary unless you have flags or options.

Justification:

plain cd is equivalent to cd ~. cd has no help accessible from the command line. This feels rather analogous to bd being equivalent to bd 1. It's supposed to save me time, which it does often, but when I'm only moving up one dir I feel like the 1 character difference between bd 1 and cd .. isn't worth the retraining my fingers.

But this is your project, and if you don't feel comfortable with removing the usage, that's okay. I can just fork it, implement it myself, and move on.

@Tarrasch
Copy link
Owner

Nice comparison @extremepayne. But I think I don't agree on the "cd has a behaviour when passed no arguments" point:

  • First, cd is much more known and used, most people who've installed bd have probably forgotten they even have it.
  • Second, how do we know the cd authors are happy with that choice or if they keep it that way for backward compatibility?

But, I think it makes sense for you to fork this and make the minor change. You have my blessings. :)

@mawkler
Copy link
Author

mawkler commented Sep 12, 2020

Ok, thanks! I made my own fork now so to anyone who also wants this behaviour my fork is over at Melkster/zsh-bd.

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