The default completions that autojump ships with for fish are broken
(emitting output like "1\___\#...") as they use hackes to work around
the previous lack of `complete -k`. The history-based autojump
completions fully replace it.
Now the description includes the variable scope, `set [-e] -[Ugl]`
completions only provide variables matching that scope, and completions
that shouldn't be modified are hidden from the user. Completions that
are often modified but rarely unset (`fish_*` variables) are omitted
from `set -e` completions.
A new helper function `__fish_seen_argument` has been added that makes
it easy to only provied completions for a specific flag.
* Completion for conda, the package manager
* Make the list of platforms a private variable
* Add commands activate and deactivate
* Avoid clobbering a user-defined function __
* Use Use __fish_seen_subcommand_from to identify subcommand
And treat the case of the first argument as a special case
with function __fish_conda_fist_arg
* Factor out create from loop for option --name
* Fix typo (missing parenthesis in description)
* Start from a blank state by removing completions from conda configuration script
- Cache translations instead of calling `gettext` once per file
- Only do the ":/" thing if the file isn't in $PWD/**
For a git repo created like
```fish
git init
touch a(seq 0 1000)b
```
this changes the time from about 2s to 0.3s.
`git rm --cached` is often used to delete a file that no longer exists
in the working tree but remains in git's index. `git ls-files` will list
files that are in the HEAD, which is exactly what we want. Local files
not in `HEAD` can't be deleted from git anyway.
The tool subcommand had a "-f" flag to disallow file completions which is wrong: most of the tools there require a file/directory argument.
Since we're here, also limit "go tool compile" to only match Go source files.
Now parses package.json and uses results to provide a list of possible
completions to `yarn remove`. There may be other subcommands that could
benefit from this.
Could have parsed yarn output, but yarn is slow and packages.json format
is generally standard since it's machine-generated json.
* 🚀
* prepare to merge into fish-shell
* split into different files
* remove deprecated option
* captitalize descriptions
* make shorter description for ansible
* update ansible-playbook (and ansible for consistency)
* update version on vault and galaxy
This never worked properly (since a branch that only exists locally
would also be offered) and is dog-slow.
When we come up with a better way to do it we can readd it.
When git prints a path like "share/completions/git.fish", that's
relative to the root of the repo. So we need to either remove
everything from the $PWD (if the path is inside the $PWD), or prepend
a ":/", which is git-speak for "relative to the root".
This was removed by mistake in the recent switch to `git status`.
Fixes#4688.
* git completions: Parse git status --porcelain
This is much faster on large repositories, as it allows us to do a lot
more with a single git call.
It also makes it easy to add descriptions to distinguish modified
files from untracked ones.
TBD is if all commands now have the right kinds of files.
[ci skip]