Skip to content

Instantly share code, notes, and snippets.

@shikajiro
Last active April 29, 2017 12:04
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 shikajiro/37cbe95581051141a9e13af1c34f22ce to your computer and use it in GitHub Desktop.
Save shikajiro/37cbe95581051141a9e13af1c34f22ce to your computer and use it in GitHub Desktop.
bashでディレクトリ移動した時に `.start.sh` が存在したらそれを実行する。.bashrcに追加する
autoshell(){
[[ -n $AUTOLS_DIR ]] && [[ $AUTOLS_DIR != $PWD ]] && [ -e ./.start.sh ] && ./.start.sh
AUTOLS_DIR="${PWD}"
}
PROMPT_COMMAND="autoshell"
@shikajiro
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment