Created
August 18, 2011 18:44
-
-
Save coldnebo/1154804 to your computer and use it in GitHub Desktop.
bash helper to navigate directory stacks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I use pushd and popd to maintain a directory stack and so I like being able to navigate | |
# around the stack with the cursor keys. Here's how: | |
# 1) pushd <new dir> | |
# 2) use CTRL+UP, CTRL+LEFT or CTRL+RIGHT as follows: | |
# bind ctrl + cursor keys: | |
# left = prev; right = next; up = list | |
bind '"\e[1;5A":"dirs\C-m"' | |
bind '"\e[1;5D":"pushd -0 2>/dev/null\C-m"' | |
bind '"\e[1;5C":"pushd +1 2>/dev/null\C-m"' |
timfriske
commented
Nov 22, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment