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

Re: why is eval needed?



On Sat, Nov 19, 2022 at 6:03 PM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
 > test:local:5: not valid in this context: -L

The original code you've posted doesn't generate this error:

    % local level='-L 2'
    % tree $level
    tree: Missing argument to -L option.

This is as expected. The same as here:

    % tree '-L 2'
    tree: Missing argument to -L option.

I can get "not valid in this context" error with this:

    % local level -L
    local: not valid in this context: -L

You must be doing something differently compared to what you've posted.

Roman.




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