lucmove |
01-02-2012 01:06 PM |
Shell based menu of options
I have been testing the Fish shell for a few days, enjoying it so far to an extent. It has bugs and lacks features, but behaves pretty well in the command line, and I like it for scripts too, because the syntax is a lot simpler and cleaner.
Like I said, it lacks features. I like the 'select' command in other shells, it creates a nice menu of options. For example:
Code:
navigate () {
PS3="Where do you want to go today? "
select TARGET in google microsoft yahoo quit
do
case $TARGET in
google )
local url=http://www.google.com
break ;;
microsoft )
local url=http://www.microsoft.com
break ;;
yahoo )
local url=http://www.yahoo.com
break ;;
quit) exit;;
*) exit ;;
esac
done
lynx $url
}
Fish has no such feature so I guess I will have to use some external program. What do you recommend? I suppose things like zenity or dialog would be overkill?
|