This seems to have randomly started a few days ago. It used to be fine to run fish shell from Ubuntu bash for Windows. But suddenly when I hit Tab for autocomplete, it barfs with:

The file "x86" is not executable by this user in command substitution called on standard input

Also, when I just type x86 it doesn't actually run a command, but it tells me:

The file "x86" is not executable by this user

However, which x86 outputs nothing.

Any clue what in the world could be going on here?

  • whats your pwd? are you on or evaluating a path to c:\program files (x86)\ ? bash is likely to parse that as multiple file names. windows should never have allowed whitespace in filenames... – Frank Thomas Nov 22 '17 at 19:36
  • Ah, it looks like ` /mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common` (among a few others) is on my PATH. Is there a way to either eliminate those, as they're not even remotely relevant for the subsystem.... I mean, I could manually set the PATH of course – Wayne Werner Nov 22 '17 at 21:50
up vote 2 down vote accepted

This was a bug present in fish and fixed in version 2.3.0 - if it is still present in later versions, a report would be greatly appreciated.

You can install a newer version from the Ubuntu PPA repositories if the version installed by apt-get is too old.

  • You r question solves the problem, mine just rambles :) – Vedant Nov 25 '17 at 3:16

The issue here is in completer_t::complete_cmd, which invokes expand_string. This is a very general function that expands things like wildcards, process expansion, variable expansion, etc.

It's surely wrong to do these expansions in the components of $PATH.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.