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

Re: null commands...



Vincent Lefevre (vlefevre@xxxxxxxxxxx) wrote:
> This wouldn't always work. $PAGER may have arguments, e.g. "less -is".
> But $READNULLCMD can't:
[...]
> Is it a bug?

No, it's another gripe for READNULLCMD (regardless of $PAGER): It
should be parsed as command-line string.  So
< file
should be translated to
${=READNULLCMD} < file
instead of $READNULLCMD < file, which is currently the case.

With the $PAGER changes zsh would do the following:

If READNULLCMD is non-empty, `< file' means `${=READNULLCMD} < file',
else if PAGER is non-empty, `< file' means `${=PAGER} < file',
else `< file' means `more < file'.

I think this behaviour would be well-accepted by the users which
generally set PAGER to whatever they like (e.g. less or "less -i").
Would it be hard to code to exec.c?

-- 
} WWW:          World-Wide-Waste.  Waste management corporation, which
}               handles the billions of tons of garbage generated by just
}               about everybody these days.
} You owe the Oracle a good book.  In HyperText, please.



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