Last active
November 9, 2018 21:06
-
-
Save elchingon/80d87279bc6b67eaa797dae058c9c00c 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
#!/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