Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@metacritical
Created January 23, 2012 13:18
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 metacritical/1663075 to your computer and use it in GitHub Desktop.
Save metacritical/1663075 to your computer and use it in GitHub Desktop.
An Interactive menu in .bash_profile using shell script.
[[ -s "/Users/pankajdoharey/.rvm/scripts/rvm" ]] && source "/Users/pankajdoharey/.rvm/scripts/rvm"
#PS1='\033[7h\033[37m\W ∑\033[0m\033[31m™\033[0m»'
echo "$(tput setaf 7)$(tput setab 1)Select an app:$(tput sgr0)"
tput setaf 3
select i in irb emacs macirb rubinius jruby node.js gnu-smalltalk gnu-lisp cmucl io-lang bash opt vim source
do
tput bold
tput setaf 3
case $i in
irb) irb --simple-prompt;;
emacs) emacs;;
macirb) rvm use macruby;macirb;;
rubinius) rvm use rbx;rbx;;
jruby) rvm use jruby;jirb;;
node.js) node;;
gnu-smalltalk) gst;;
cmucl) lisp;;
gnu-lisp) clisp;;
io-lang) io;;
opt) echo "Type opt when in bash for this menu.";;
source) source /Users/pankajdoharey/.bash_profile;;
vim) vim;;
bash) break;;
esac
tput sgr0
done
export CLICOLOR=1
export LSCOLORS=BxFxCxDxBxegedabagacad
export PS1="$(tput setaf 1)$(PWD)/$(tput setaf 5)\w\n ∑\@ $(tput setaf 1)™»$(tput sgr0)"
export PATH="./bin:$PATH"
#export PS1="$(pwd)/\w\n>"
export JRUBY_OPTS=--1.8
@metacritical
Copy link
Author

Just an Interactive menu in .bash_profile using shell script.

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