On Fri, Jun 06, 2008 at 07:08:26PM -0400, Philip Ganchev wrote: > On Fri, Jun 6, 2008 at 12:50 AM, Martin Bähr > <[EMAIL PROTECTED]> wrote: > > On Thu, Jun 05, 2008 at 05:54:05PM -0400, Philip Ganchev wrote: > >> On 6/2/08, Piotr Husiatyński <[EMAIL PROTECTED]> wrote: > >> > var=$(dmenu_path | dmenu); exec $var > >> function temp_func; dmenu_path | dmenu; end > >> temp_func > > in this example it may not matter, but in other cases it can make a > > difference if running the command has sideeffects or changes the result. > Not sure what you mean.
var=$(dmenu_path | dmenu); first executes dmenu_path, and if that fails it runs dmenu. the output is saved and stored in $var. $var may be reused many times. temp_func would execute dmenu_path every time it is called. (and now that i look at it, it doesn't even do what is expected here, namely take the string that dmenu_path dmenu print, and run that as a command.) greetings, martin. -- cooperative communication with sTeam - caudium, pike, roxen and unix offering: programming, training and administration - anywhere in the world -- pike programmer travelling in china community.gotpike.org unix system- iaeste.(tuwien.ac|or).at open-steam.org administrator caudium.org is.schon.org Martin Bähr http://www.iaeste.or.at/~mbaehr/ ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users