zsh-workers
 help / color / mirror / code / Atom feed
From: John Polansky <johnpolansky@gmail.com>
To: zsh-workers@zsh.org
Subject: ZSH - tab-completion of $PATH won't work with /./ or /../ in it
Date: Tue, 8 Dec 2015 23:24:49 -0600	[thread overview]
Message-ID: <CAKKoV8-uEhgRxL_9byx+7OHzgTiqYTT5LSyGmcAZowR4GeJFZA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 722 bytes --]

I've noticed a bug in:

 zsh --version
zsh 5.2 (x86_64-apple-darwin15.0.0)

It drove me up the wall before I realized but it appears if in your $PATH
variable you have a path that contains /./ or /../ the tab-completion for
commands will not search that directory.

For example

*export PATH=/Users/jpolansky/test*
which has a command *cmd_test* in it with +x permissions.

$ cmd<tab>
-- it finds cmd_test

But if you have:
*export PATH=/Users/jpolansky/./test*
*or*
*export PATH=/Users/jpolansky/../test*

*#cmd<tab>*
-- fails to find cmd_test

While I realize it's unusual to have . or .. in a path.. it can happen
through scripting and to me this seems like a bug which should be fixed.
Hopefully you will agree.

John

             reply	other threads:[~2015-12-09  5:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-09  5:24 John Polansky [this message]
2015-12-09  6:22 ` Bart Schaefer
2015-12-09 10:00   ` Peter Stephenson
2015-12-09 11:50   ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKKoV8-uEhgRxL_9byx+7OHzgTiqYTT5LSyGmcAZowR4GeJFZA@mail.gmail.com \
    --to=johnpolansky@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).