Expands the utility of `type -p foo` by allowing it to print the path to
the script that defines `foo` when `foo` is a valid function that was
sourced from a path on disk (rather than interactively defined).
This does not change the behavior of `type -P`/`type --force-path`,
which should have already been used if the desire was to resolve the
path to an executable file (otherwise the output would have been blank
if a function was shadowing an executable file of the same namea), so no
backwards compatibility issues are expected.
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]
Previously, using special regex characters or slashes would result in an
error message, when pressing tab in a command-line such as
"man /usr/bin/time ".
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
Make it so that the generated completion has the form \t\n
when the optional description has been ommitted - otherwise
the original option's description gets inherited and is seen hundreds
of times repeating in the pager.
GNU ls's --indicator-style=classify is the same as POSIX -F.
Refactor and change command testing logic so that we define the
function in the same place for all platforms, and use -F on all
the platforms when stdout is a TTY.
Our weird %-expanding function wrappers around kill et all defined
"--wraps" for the same name.
As it turns out, fish follows that one, and executes the completion
multiple times.
I didn't notice because these tend to be rather quick on linux, but on
macOS that's apparently a real issue.
Fixes#5541.
[ci skip]
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
Some $TERMs like tmux and linux use an sgr0 ("reset") value that ends
in \co instead of "m". We need to adjust our regex here to catch that,
or we'd miscount lines with it.
This broke when --preset was introduced.
We allow a "--preset" or "--user" to appear right after the "bind",
and save the value, but don't use it yet.
Fixes#5534.
[ci skip]
A person stuck installing it just for fish on their server
doesn't want to waste time installing the wrong one, so assuage that.
Also tweak to look nicer with 80 columns
As discussed in #5492, it would be good if running fish_config without
Python actually told the user to install Python.
Further, let's give the person some hints on how to configure these
things by hand, since they may have to.
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.
Which is 4, apparently.. (builtin_set.cpp returns ENV_NOT_FOUND)
here. This was previously hardcoded to our 121, which used to be
what builtins used for invalid arguments.
4 is pretty arbitrary but at least this is more consistent.
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.
Starting with Fedora 30 and RHEL 8, ambiguous python shebangs will now
throw errors during the RPM build process instead of just warnings,
since these systems have moved to Python 3 by default, and Python 2 may
not be available in the future.
See [this
page](https://fedoraproject.org/wiki/Changes/Make_ambiguous_python_shebangs_error)
for more details.
Drop these shebangs as the scripts are only ever called from fish
wrappers.
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.
* Severely extended the sorin theme
This theme should now mostly match the original.
* Removed superfluous whitespace
* Inlined external links as ASCII art
* Made myself the author of the sorin theme
* Removed superfluous read delemiter
* Renamed __fish_git_action to fish_print_git_action
* Adde a minor comment