Don't do it when the relative path is simple (purely descending),
unless the token starts with ":/".
Also stop offering directories - if they need to be disambiguated, the
normal completion logic will take care of that.
Fixes#5574.
[ci skip]
shorter descriptions that can fit in a terminal window, and option arguments added.
hide one option that is only functional on Cygwin unless we are on Cygwin
On `set fish_color_cwd <TAB>`, a bunch of named colors are
shown in the pager. Each and every one has a description of "Color".
These are all very obviously colors, and none are not colors,
the description does not tell us anything specific about the item.
Descriptions in situations like this are actually a hinderance
because of the way they cause less to fit into the pager. Remove it
This was an oversight from the previous commit. Not that it matters
much, because we already removed $files.
Still, this would fail if someone defined a global $files, so let's fix it.
[ci skip]
We can't complete these, and now the user can do
```
set -g __fish_git_alias_$alias $command
```
e.g.
```
set -g __fish_git_alias_co checkout
```
if the arguments in the alias end up going to `git alias`.
Fixes#5412.
[ci skip]
This enables fuzzy-matching outside of the current directory again.
As it turns out, the performance impact here isn't as large as I
thought - it's massively dependent on caching.
Fixes#5476.
I had previously introduced a lot of updates and fixes to npm registry
based completions for `yarn` but hadn't ported them to `npm` as well
(although they can be dropped in as-is). This patch shares the code
between the two, which resides in an explicitly sourced multi-function
fish script.
The informational message is only shown the first time an attempt at
completing `yarn add` is made per session. This should vastly improve
the discoverability of this feature as regular yarn/npm users would
never have `all-the-package-names` installed normally.
This checks if uname exists (we already call it elsewhere without
check, nobody has complained, uname is in POSIX), then calls to see if
it's "Linux", and only then offers any completions.
Since we don't have any other version to offer, the check is worse
than useless.
`ls` was suggesting options that are are not valid for my system,
omitting options that are on my system. Different BSD OSes have
different option extensions, and some of them do conflict with eachother.
I carefully checked the manuals of netbsd, macos, freebsd, and openbsd
`ls` and made the completions show the right completions in full for them.
Some verbiage tweaks as well.
Fixes some potentially unsafe uses of direct substitution into regex
expressions and also switches some completions to regex-based now that
there is a safe way of using it.