fish-shell icon indicating copy to clipboard operation
fish-shell copied to clipboard

Autocomplete fails for directories with a single quote in their name

Open alaborie opened this issue 11 years ago • 3 comments

Hello,

I've notice that autocompletion fails for directories that have a single quote in their names.

Steps to reproduce:

  1. cd to an empty directory
  2. mkdir -p foo_local's_iMac foo_local's_MBP
  3. cd (gives me cd "foo_local's_")
  4. After that hitting tab again doesn't do anything

The regular autocomplete behavior would be:

  • first tab: command line is "cd "foo_local's_"
  • second tab: the two directories "foo_local's_iMac" and "foo_local's_MBP" are displayed under the command line
  • third tab: command line is now "cd foo_local's_MBP/"
  • fourth tab: command line is now "cd foo_local's_iMac"

Then it loops back on the "third tab" behavior.

Here's the version of fish I'm using: % brew info fish fish: stable 2.1.2 (bottled), HEAD http://fishshell.com /usr/local/Cellar/fish/2.1.1 (677 files, 5.4M) Built from source /usr/local/Cellar/fish/2.1.2 (670 files, 5.5M) * Poured from bottle From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/fish.rb

alaborie avatar Mar 18 '15 07:03 alaborie

Fixed for me in the latest Git version. You could run a nightly[1] if you need this to work really badly. ;)

[1] https://github.com/fish-shell/fish-shell/wiki/Nightly-builds

On Wed, 18 Mar 2015 at 08:37 Alexandre Laborie [email protected] wrote:

Hello,

I've notice that autocompletion fails for directories that have a single quote in their names.

Steps to reproduce:

  1. cd to an empty directory
  2. mkdir -p foo_local's_iMac foo_local's_MBP
  3. cd (gives me cd "foo_local's_")
  4. After that hitting tab again doesn't do anything

The regular autocomplete behavior would be:

  • first tab: command line is "cd "foo_local's_"
  • second tab: the two directories "foo_local's_iMac" and "foo_local's_MBP" are displayed under the command line
  • third tab: command line is now "cd foo_local's_MBP/"
  • fourth tab: command line is now "cd foo_local's_iMac"

Then it loops back on the "third tab" behavior.

Here's the version of fish I'm using: % brew info fish fish: stable 2.1.2 (bottled), HEAD http://fishshell.com /usr/local/Cellar/fish/2.1.1 (677 files, 5.4M) Built from source /usr/local/Cellar/fish/2.1.2 (670 files, 5.5M) * Poured from bottle From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/fish.rb

— Reply to this email directly or view it on GitHub https://github.com/fish-shell/fish-shell/issues/1991.

snnw avatar Mar 18 '15 09:03 snnw

Indeed, I can reproduce this in 2.1.1 but not in the master build from bff68f3 - so I'm going to close this issue for now. If you can see it in HEAD builds please feel free to reopen!

zanchey avatar Mar 19 '15 01:03 zanchey

Thanks for the answer. I'm gonna wait for the next stable version...

alaborie avatar Mar 19 '15 06:03 alaborie