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

Re: [PATCH] _file_descriptors: initialize `list' array with local -a



Eric Cook wrote:
> Question: is there a reason why the upper limit is fd9?

Because redirections don't let you use two-digit numbers.
However, the {var} syntax will allocate higher numbered file
descriptors so the limitation is out-of-date and can probably be
ignored.

The updated function looks good. One slight issue is that description
separators don't align now that two digit fds are included:

0 -- standard input
1 -- standard output
10 -- /dev/pts/6

zformat can do that in the general case but you might get away with
  "${(r.$#fds[-1].)i} $sep ...

We have worse examples of that such as git subcommands.

Oliver



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