2006/8/14, Axel Liljencrantz <[EMAIL PROTECTED]>: >On 8/14/06, Martin Baehr <[EMAIL PROTECTED]> wrote: <zap> >>i used: >> echo "help is being displayed in a window of" $fish_browser >>which tells me exactly what i want to know, namely which executable fish >>has found for use. > >help is being displayed in x-www-browser > >is not helpful, IMO. I added this to help.fish: > > set -l browser_name $fish_browser > switch $fish_browser > case 'htmlview' 'x-www-browser' > set browser_name (_ 'your default browser') > end > printf (_ 'help: Help is being displayed in %s\n') $browser_name
May I suggest something akin to the following instead? switch $fish_browser case 'htmlview' 'x-www-browser' set browser_name (_ 'help: Help is being displayed in your default browser\n') break default: printf (_ 'help: Help is being displayed in %s\n') $fish_name end Note that I'm not completely sure about fish's switch and case'ing. It might also be more profitable to use an if-else clause instead, I'm not sure. >The strange bits with '_' are for providing translations to other languages. And the above allows for 'weird' locales to say something like "Help is browser displayed in your default." (I'm not sure there are any languages/locales that would put it like that, but the option exists and this would make it more clean for those. Basic i18n rule of thumb: Refrain from splitting up sentences whenever you can help it.) -- Frederik 'Freso' S. Olesen <http://freso.dk/> ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users