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

[vincent@xxxxxxxxxx: Bug#300470: zsh: trap mechanism on command-line length limitation with zargs-based fallback]



Any thoughts on this idea?

----- Forwarded message from Vincent Lefevre <vincent@xxxxxxxxxx> -----

Note: this is a linux-only wishlist; I hope this wouldn't be a problem
for upstream.

It is well-known that the Linux kernel has a limitation on the length
of the command line. A solution is to use xargs or zargs (probably
better with zsh), but when typing interactive commands in particular,
this is annoying.

So, what I wish, is:
  * a configurable command-based trap mechanism when the command line
    is too long;
  * default fallbacks distributed with the zsh package.

Here's an example: I type "rm **/*.foo". If the command line is not too
long, the rm command is executed as expected. Otherwise, an alternate
rm command (something like a builtin) is executed, using zargs. This
alternate command should be able to cope with the various rm options,
special filenames (e.g. starting with a '-') and error handling to hide
the unwanted side effects of the rm wrapper.

Ditto for the other common commands (mv, cp, etc.).

----- End forwarded message -----



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