Skip to content

Instantly share code, notes, and snippets.

@hacolab
Last active July 20, 2019 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hacolab/97f3c8bf083fed5b4dec5378c0895c81 to your computer and use it in GitHub Desktop.
Save hacolab/97f3c8bf083fed5b4dec5378c0895c81 to your computer and use it in GitHub Desktop.
# 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