Re: [Fish-users] exec $VALUE doesn't work

2008-06-06 Thread Philip Ganchev
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

Re: [Fish-users] exec $VALUE doesn't work

2008-06-06 Thread Martin Bähr
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

Re: [Fish-users] exec $VALUE doesn't work

2008-06-06 Thread Philip Ganchev
On Fri, Jun 6, 2008 at 7:51 PM, Martin Bähr [EMAIL PROTECTED] wrote: 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

Re: [Fish-users] exec $VALUE doesn't work

2008-06-06 Thread Isaac Dupree
Philip Ganchev wrote: Maybe something like this would work: dmenu_path | dmenu dmenu_file . dmenu_file And what is wrong with using eval $var here?? set var (dmenu_path | dmenu); eval $var Those both evaluate the value of var (and any arguments, if you were passing any arguments to

Re: [Fish-users] exec $VALUE doesn't work

2008-06-05 Thread Isaac Dupree
on the other hand, I would be happy if `command $var` (including `exec command $var args...`) was allowed. Because that makes clear that you're not going to let arbitrary vars call into the shell internal stuff by accident like that (or is there ever a real use case for that?? crazy shell

Re: [Fish-users] exec $VALUE doesn't work

2008-06-05 Thread Philip Ganchev
On 6/2/08, Piotr Husiatyński [EMAIL PROTECTED] wrote: [...] var=$(dmenu_path | dmenu); exec $var [...] That can be translated as: function temp_func; dmenu_path | dmenu; end temp_func functions -e temp_func More verbose, but perhaps clearer. If I recall correctly, the reason for

Re: [Fish-users] exec $VALUE doesn't work

2008-06-05 Thread Martin Bähr
On Thu, Jun 05, 2008 at 05:54:05PM -0400, Philip Ganchev wrote: If I recall correctly, the reason for disallowing execution of variables is that it makes syntax checking impossible. that explaind why $command fails but it doesn't explain the failure of exec $command there are other