On Thu, Jan 30, 2025 at 08:13:15AM -0500, Greg Wooledge wrote:
> On Thu, Jan 30, 2025 at 13:59:37 +0100, Roger Price wrote:
> >  alias w3m='/usr/bin/w3m -no-cookie -o auto-image=TRUE '
> 
> >  w3m() { /usr/bin/w3m -no-cookie -o auto-image=TRUE $@ ; }
> > 
> > and received the error message
> > 
> >  bash: .bashrc: line 86: syntax error near unexpected token `('
> >  bash: .bashrc: line 86: `w3m() { /usr/bin/w3m -no-cookie -o 
> > auto-image=TRUE $@ ; }'
> 
> The problem is you *already* have the alias, and the alias gets expanded
> when you try to define the function.

D'oh. This actually only happens with aliases, you are right.
In my other answer I posted some nonsense.

Remember: in things shell (at least), if Greg says something and
me something else, Greg is most probably right :-)

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature

Reply via email to