Last active
July 20, 2019 06:19
-
-
Save hacolab/97f3c8bf083fed5b4dec5378c0895c81 to your computer and use it in GitHub Desktop.
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
# USAGE: source "$0" on c-shell | |
if ( "$1" != "" ) then | |
if ( ! -d "$1" ) then | |
echo "'$1' is not directory!" | |
exit 1 | |
endif | |
set root=$1 | |
else | |
set root="." | |
endif | |
set selected_dir=`find "$root" -type d |& grep -v "^find:" | fzf"` | |
if ( "$selected_dir" == "" ) exit 0 | |
cd "$selected_dir" | |
unset selected_dir | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment