Last active
May 30, 2020 01:50
-
-
Save snipsnipsnip/347461 to your computer and use it in GitHub Desktop.
cd to previous directory / next directory
This file contains 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
alias pd='cd "../$(ls .. | grep -B1 $(basename $(pwd)) | head -1)"' | |
alias nd='cd "../$(ls .. | grep -A1 $(basename $(pwd)) | tail -1)"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment