Commit graph

892 commits

Author SHA1 Message Date
Mahmoud Al-Qudsi
a2cb9cceaf Erase default autojump completions in j.fish completions
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.
2018-04-14 23:23:33 -05:00
Mahmoud Al-Qudsi
facdc88c0c Improve completions for ssh by completing from history 2018-04-12 22:28:50 -05:00
Wilke Schwiedop
5d01399586 add file readability-test 2018-04-09 01:09:49 +02:00
Wilke Schwiedop
8ae9b716a0 fix 'grep ... | sed' 2018-04-09 01:09:49 +02:00
Wilke Schwiedop
bd24e8662e fix 'sort | uniq' 2018-04-09 01:09:49 +02:00
George Christou
6c0f31d622 completions: [git] Use builtin git truncation 2018-04-09 01:07:52 +02:00
Fabian Homborg
01f24f2df6 Fix typo in emacs completions
Fixes #4885.

[ci skip]
2018-04-09 00:46:35 +02:00
Mahmoud Al-Qudsi
c492d03f51 Overhaul completions for set and add new completions for set -e
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.
2018-04-03 14:42:26 -05:00
ridiculousfish
358e9def5b Fix the git completion
Commit 6e56637cf ran fish_indent on the git completion and mangled some
of it. Manually revert the non-essential changes.
2018-04-02 10:26:40 -07:00
Peter Ammon
7659554dea Remove use of caret redirection from share/*
This removes the use of caret redirections from share/completions
and share/functions, in preparation for dropping support in fish.
2018-04-01 13:42:38 -07:00
ridiculousfish
6e56637cf0 Remove support for the ? wildcard
Fixes #4520
2018-03-31 16:54:50 -07:00
Luc J. Bourhis
c116843611 Completion for conda, the package manager (#4837)
* 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
2018-03-26 17:07:23 +02:00
Daniel Beckwith
7583d57b63 Add Makefile --file detection to completion 2018-03-23 22:45:40 -07:00
Wilke Schwiedop
44e2c28255 revisit gentoo-related completions (#4758)
* revisit gentoo-related completions

- add completion for emaint
- improve completion for emerge
  still incomplete, but an impovement regardless
- improve completion for equery
- add gentoo/portage-related auxiliary functions

* fix spelling

* remove trailing '.'

* remove old '_' invocation and capitalize descriptions

* add number-completion

* remove trailing '.'

* shorter descriptions

* replace sed with fish-builtin and drop deduplication

* batch change capitalization (lower case)

* indent equery descriptions

* batch change capitalization (upper case)
2018-03-23 19:42:30 +01:00
Fabian Homborg
316303d777 [subl completions] Take files with new-window
Fixes #4831.

Thanks @luc-j-bourhis.
2018-03-17 21:06:44 +01:00
Laurent Pireyn
5732aeac9a Create completion for JBake 2018-03-15 21:59:23 +08:00
Fabian Homborg
228c5c1319 [git completions] Filter unreplaced $PWD
Otherwise this'd let the full filename through if it isn't in $PWD.
2018-03-14 10:56:59 +01:00
Lee Dohm
3ec1fab7aa Update to handle latest Atom options (#4801)
* Update to handle latest Atom options

* Fix typo and wording
2018-03-13 14:12:35 +01:00
Fabian Homborg
b2d887860a [git completions] Speed up __fish_git_files with lots of files
- 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.
2018-03-13 13:47:17 +01:00
Fabian Homborg
4057cfdce5 [git completions] Minor cleanup 2018-03-13 13:45:37 +01:00
Fabian Homborg
bc976a913c [git completions] Use staged files for rm --cached 2018-03-13 13:45:03 +01:00
Fabian Homborg
8b4ac66349 [git completions] Reremove stray "[" 2018-03-13 13:44:36 +01:00
Mahmoud Al-Qudsi
c24739d3bd Use git ls-files instead of local files for git rm --cached
`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.
2018-03-12 19:22:41 -05:00
Mahmoud Al-Qudsi
c51abd04ff Clean up $__fish_*dir variable names
Closes #4429
2018-03-12 08:34:20 -05:00
Giovanni Bajo
3b7d759d11 Update completions for go
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.
2018-03-12 20:34:35 +08:00
Daniel Apolinario
cc80951e79 Completions for bb-wrapper and powerpill
Completions for bb-wrapper (bauerbill) and powerpill
2018-03-10 18:31:29 +01:00
George Christou
4ae6843b6b completions: [git] Fix rogue bracket typo (#4799) 2018-03-10 18:30:43 +01:00
ridiculousfish
9a5afe3913 Clean up and document functions --handlers 2018-03-10 02:27:25 -08:00
Mahmoud Al-Qudsi
eaa5958b77 Update completions for read builtin
Change short option for `--shell` to `-S` per #4490 and add description for -s/--silent
2018-03-09 11:59:50 -06:00
George Christou
73f2b444ef completions: [git] Do not decorate reflog 2018-03-07 22:01:23 +01:00
Mahmoud Al-Qudsi
b50541c655 Add comment about checking if jq exists in a future update to yarn completions 2018-03-06 17:03:15 -06:00
Fabian Homborg
88cf7e16c6 [git completions] Sort tags newest-first
This has the nice effect of sorting "2.7.0" before "2.7b1".
2018-03-06 22:06:39 +01:00
Fabian Homborg
5cb3918c1c [git completions] Remove unnecessary helper function 2018-03-06 22:06:39 +01:00
Fabian Homborg
f3c864a9e2 [git completions] Offer unmerged files for add
These occur e.g. when resolving a conflict, which then needs `git add`.
2018-03-06 22:06:39 +01:00
Fabian Homborg
b24971dc9e [git completions] Only offer files for log --
After a "--" separator, `git log` only takes files.
2018-03-06 22:06:39 +01:00
Fabian Homborg
754b52bb26 [git completions] Make branches work on git 2.7.0 again
This used the "--format" option, which was only added in git 2.13.0.
2018-03-06 22:06:39 +01:00
Mahmoud Al-Qudsi
a85d2bf27a Add intelligent package completion to yarn
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.
2018-03-05 08:28:19 -06:00
Kevin Konrad
8536a6825f add completion for MacPorts 2018-02-24 23:32:25 +08:00
Jordi Burguet-Castell
0cd934ea63 apt.fish: add completions for "depends" and "rdepends" 2018-02-20 22:38:48 +11:00
Benoit Hamon
54c9d57e42 Ansible completions (#4697)
* 🚀

* 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
2018-02-06 17:53:23 +01:00
Fabian Homborg
7d60d1db6d [git completions] Remove unique-remote-branches
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.
2018-01-31 21:55:22 +01:00
Fabian Homborg
18e21a0992 [git completions] Complete branches faster
This saves one `git branch` invocation and improves the descriptions.
2018-01-31 21:55:18 +01:00
Fabian Homborg
0ab437be26 [git completions] Make paths not in $PWD relative to the root again
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.
2018-01-31 11:25:13 +01:00
Fabian Homborg
4fac2f98c2 [git completions] Use status v1 output
Apparently the v2 format is too new (released Nov 2016), and the v1
format has everything we need.
2018-01-31 11:25:13 +01:00
Fabian Homborg
e3a2eadb49 Remove obsolete "--gui" option from gradle completions
Fixes #4691.

[ci skip]
2018-01-29 19:31:12 +01:00
Mahmoud Al-Qudsi
d11f9f7148 Fix git push REMOTE :BRANCH completion
The `string match` was limiting it to `git push REMOTE :<TAB>` and would
fail for `git push REMOTE :x<TAB>`. Now working as expected.
2018-01-25 20:32:20 -06:00
Fabian Homborg
ea897fcc0f
git completions: Parse git status --porcelain (#4673)
* 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]
2018-01-25 13:35:00 +01:00
Birger J. Nordølum
2ba76a7115 diskutil.fish: added apfs completions, and tweaks to old ones 2018-01-23 19:25:12 +01:00
Yurizal Susanto
a6536db502 Update Eopkg support (#4662)
Update Eopkg support

Improve Eopkg completions
2018-01-22 14:25:34 -08:00
Birger J. Nordølum
fde647214d brew.fish: added cask completion & tweaks 2018-01-18 18:05:14 +01:00