-
-
Save VienosNotes/97f269e5ff57129c4e92 to your computer and use it in GitHub Desktop.
interactive cd with peco
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
#!/usr/bin/env zsh | |
#add following alias to your ~/.zshrc | |
#alias cdp='. _cdp' | |
PWD=`ls -la | grep '^d' | awk '{print $9}' | peco --prompt="$(pwd) >"` | |
if [ $PWD = "." ]; then | |
cd $PWD | |
else | |
cd $PWD | |
. _cdp | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment