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

Re: permission denied



> On Mon, Apr 17, 2023 at 8:46 PM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> So, now having my 'chain' variable and experimenting with using it as a
> command, I run into this problem with any of my functions, like 'l' here:
>
>   % chain=( ls ); $chain
>
> ... OK as expected
>
>   % chain=( l ); $chain
>
> zsh: permission denied: l
>
>   % chain=( l ); eval $chain
>
> ... works fine.
>
> It seems strange that a perfectly usable function throws 'permission
> denied' used that way.  IIRC there are times when that message is
> misleading, it's not really a permissions issue but something else.  I
> vaguely recall crashing into this before but I can't remember what the
> real reason was.  And why does 'eval' fix it?

Run `which l` and have your question answered.

Roman.




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