commit e07f1d59c06094846db8ce59f65d4790b222fffa
Author: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
Date: Sun Sep 10 21:54:45 2017 -0500
Use git branch and git branch --remote for checkout completions
commit 9e1632236be065e051e306b11082ca4e9c7a0ee1
Author: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
Date: Sun Sep 10 11:27:30 2017 -0500
Correct classification of remote and local branches
To prevent any breakage, no changes were made to __fish_git_branches,
instead its output was filtered into __fish_git_remote_branches and
__fish_git_local_branches, the two of which are now used to provide
completions for "git checkout ..."
Fixes#4395Closes#4396
It seems that under python3, s3cmd emits its output as a long list (like
ls -l) with or without the --long parameter to "s3cmd ls s3://...".
This patch includes only s3://* paths from that output as completions.
Addresses the main concern of #3830 by preserving the internal ordering
of tag/branch listings generated by git. Fixes mixing of remote and
local branches in completions.
Does not address the concern of having local branches on top, remote
branches after, and tags at the bottom - I don't believe we have that
functionality available to us yet. #361 only implemented sort within a
category of completions, but there is no category "weight" unless I'm
mistaken.
* Add repo completion for zypper
* Replace sed with string in __fish_print_zypp_repos
* Move function into completion script
* Update zypper completion
add subcommand packages to __fish_zypper_repo_commands
Using bare vars is more efficient because it makes the builtin `math`
expression cache more useful. That's because if you prefix each var with
a dollar-sign then the fish parser expands it before `math` is run.
Something like `math x + 1` can be cached since the expression is the
same each time it is run. But if you do `math $x + 1` and x==1 then you're
effectively executing `math 1 + 1`. And if x==2 the next time then you're
running `math 2 + 1`. Which makes the expression cache much less effective.
Remove our `math` function that wraps `bc`. Our math builtin is now good
enough that it can be the default implementation.
Another step in resolving #3157.
Per the discussion with @faho in #4332, replaced some custom completion
state detection functions with standard __fish_* functions used in other
completion sources.
(cherry picked from commit f706081ea4)
No longer auto-generated. Everything has been summarized. Supressing
file completions for initial command, providing list of valid initial
commands, filtering --options by subcommand.
(cherry picked from commit 539acd9fc5)
This patch adds completion for the update subcommand, that is, when the
user types in `composer update <tab>`.
The code depends on python for the json parsing. I'm not sure if this
is appropriate or if there is a fish-native way to parse json data.
Use suggestions for remove subcommand.
Add suggestions for why, why-not and depends.
Add why/why-not suggestion.
Specifically closes#4313.
Not being as agressive in what we ignore/blacklist, but can be revisited
easily in the future to add more characters to the argument blacklist.
Rewrite the `abbr` function to store each abbreviation in a separate
variable. This greatly improves the efficiency. For the common case
it is 5x faster. For pathological cases it is upwards of 100x faster.
Most people should be able to unconditionally define abbreviations in
their config.fish without a noticable slow down.
Fixes#4048
The primary motivation for --keep-order for `complete` was to support
something like commit history completions, which are returned by git in
reverse chronological order and make no sense alphabetically (they are
SHA1 hashes).
See https://github.com/fish-shell/fish-shell/issues/361 for more info.
* Make npm run-script completion faster with `jq`
When jq is available, it's actually faster to invoke jq and parse the `package.json`
invoking the `npm` command.
Also, prior to this commit, both `__fish_complete_npm` and `__fish_npm_run` were being run
whenever completions for `npm run` subcommand was being used, which was actually making
repetitive work (invoking npm command twice). This pull request is supposed to make completion
without `jq` faster as well
* Refactor npm.fish for code reutilization
Created function to handle both cases of npm run completion parse, with or without `jq` completion.
* Remove unecessary blank line