Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: echo ${pwd::="$( pwd/Next)"} failed



In the last episode (Feb 01), Marc Chantreux said:
> Found in zsh man
> 
> ${NAME:=WORD}
> ${NAME::=WORD}
>     In the first form, if NAME is unset or is null then set it to
>     WORD; in the second form, unconditionally set NAME to WORD.  In
>     both forms, the value of the parameter is then substituted.
> 
> echo ${pwd::=pw3Pwe7}
> 
> works fine but
> 
> echo ${pwd::="$( pwd/Next)"}
> 
> failed. Is there a way to make it run ?

Failed with what error message?  A similar command works for me:

 dan% echo ${pwd::=$(apg -n 1)}
 KiUpVuc6
 dan% echo $pwd
 KiUpVuc6

-- 
	Dan Nelson
	dnelson@xxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author