Skip to content

Instantly share code, notes, and snippets.

@elchingon
Last active November 9, 2018 21:06
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 elchingon/80d87279bc6b67eaa797dae058c9c00c to your computer and use it in GitHub Desktop.
Save elchingon/80d87279bc6b67eaa797dae058c9c00c to your computer and use it in GitHub Desktop.
#!/bin/bash
# this needs to be run in crrent process with the "dot" command
# . create_vim.sh ims|opc
tabname=$1
printf "\e]1;${1-$(basename `pwd`)}\a"
case $tabname in
ims)
cd '/Users/xxxxxx/Sites/tayda/tayda_inventory'
;;
opc)
cd '/Users/xxxxxx/Sites/tayda/tayda_opc'
;;
te)
cd '/Users/xxxxxx/Sites/tayda/taydaelectronics'
;;
tayda_kits)
cd '/Users/xxxxxx/Sites/tayda/tayda_kits'
;;
te_server)
cd '/Users/xxxxxx/Sites/tayda/taydaelectronics-files'
;;
*)
echo $tabname
;;
esac
directory_name="/Users/xxxxxx/Sites/$tabname"
echo $directory_name
if [ -d "$directory_name" ]; then
# Control will enter here if $DIRECTORY exists.
echo "Found"
cd $directory_name
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment