Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Inconsistent tab completion with 'autocd' option and with 'cd' command
- X-seq: zsh-workers 35621
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Inconsistent tab completion with 'autocd' option and with 'cd' command
- Date: Fri, 26 Jun 2015 14:47:34 -0700
- In-reply-to: <CA+C-WL-u5dccZr=NN6rG3yMjnWLQJpa+pmhHPF_NpuPkDUoOig@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CA+C-WL-u5dccZr=NN6rG3yMjnWLQJpa+pmhHPF_NpuPkDUoOig@mail.gmail.com>
On Jun 26, 2:55pm, Patrick Palka wrote:
}
} In particular I am not a fan of the completion results of the 'autocd'
} variant. It would be nice if the two completion results were
} consistent. Hope this "bug report" is clear and helpful :)
Hmm. So far, analysis without suggested alteration:
_cd says:
# Don't complete local directories in command position, that's
# already handled by _command_names (see _autocd)
_command_names uses:
_path_files -/g \*\(-\*\)
This will follow ".." literally up to z/a rather than symbolically
up to z, so ../c is not a possible path.
Whereas _cd uses:
_path_files $tmpWpath -/
where $tmpWpath is computed by a messy hack that forks a subshell to
actually preflight the "cd" to be sure CHASE_LINKS etc. is properly
managed.
This makes no difference unless you're using "../" somewhere in the
string in command position *and* there are no executable files in
the directory to which you are attempting to autocd.
Also your specific example is quite often suppressed for "cd" by the
ignore-parents style.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author