-
Notifications
You must be signed in to change notification settings - Fork 66
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
Add directory stack to cd #145
base: master
Are you sure you want to change the base?
Conversation
Thanks for the contribution 👍 I need to do more research to see how the directory stack works in other shells, but from the top of my mind they usually also have |
When reading more about directory stack in other shells I also learned that I have a question, do you just use cd to jump to last directory or do you use the functionality to jump to a directory deeper in the stack? I try not to blindly copy every feature and personally have never used the directory stack. Comments to the proposed implementation:
ConlusionI see two options:
@tramzee Would 1) be enough to cover your usage? Sources: |
@dundalek I use the directory stack deeper than just one. However, I would say that 90% of my usage is |
Also, I would be willing to tale a cut at doing the full directory stack implementation (pushd, popd, and dirs). |
@tramzee Cool, that makes sense. I am also interested in having the full dir stack implementation, so that would be great. FYI I refactored the built-ins a bit so that they are now defined with |
I like to use
cd -
to flip back and forth between two directories.This implements a very rudimentary directory stack that allows an easy way to return to a previous directory. It also adds a
dh
command that allows one to view the stack.