On Sat, Feb 19, 2011 at 12:45 PM, weakish <weak...@gmail.com> wrote:
> In fish's user doc (section "Combining different expansions"):
>
>> When combining multiple parameter expansions, expansions are performed
>> in the following order:
>>
>>   * Command substitutions
>>   * Variable expansions
>
> So command substitutions get performed before variable expansions?
>
> But give fish the following code:
>
>    echo $(echo HOME)
>
> fish said:
>
>    echo $(echo HOME)
>         ^
>
> It seems variable expansion happens first here?

No, first Fish checks the syntax. The command you typed is
syntactically incorrect. Fish returns an error message, but not the
one you posted. It says:

fish: Did you mean (COMMAND)? In fish, the “$” character is only used
for accessing variables. To learn more about command substitution in
fish, type “help expand-command-substitution”.
echo $(echo $PATH)
     ^

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to