Commit Graph

3525 Commits

Author SHA1 Message Date
Akatsuki
46c253b9d6 completions/set: add --path and --unpath
Add missing options:
--path causes the specified variable to be treated as a path variable, meaning it will automatically be split on colons, and joined using colons when quoted (echo "$PATH") or exported.
--unpath causes the specified variable to not be treated as a path variable. Variables with a name ending in "PATH" are automatically path variables, so this can be used to treat such a variable normally.

[ci skip]
2020-05-13 20:28:35 -07:00
Fabian Homborg
ea0a0991a1 anypython: Try supported numbered python3 versions
In case someone doesn't even have a `python3` symlink.
2020-05-10 22:49:25 +02:00
David Adam
30a8345a11 create_manpage_completions: use the first tool found
Noted in https://github.com/fish-shell/fish-shell/pull/6879#discussion_r421731269
2020-05-10 21:56:12 +08:00
Jason Nader
90c89c877f Use short flag for --description for consistency in code base 2020-05-08 22:58:52 +02:00
Jason Nader
bb65f81e64 edit_command_buffer: Add line:col support for micro 2020-05-08 20:00:07 +02:00
Eamon Caton
b665604475 Add newline to history clear message for consistency 2020-05-08 22:36:57 +08:00
Ron Gebauer
54f3fbbf8c
Fix issue if md5sum is used instead of md5 (#6958)
* Fix issue if md5sum is used instead of md5

Both have a different output which results in different array sized

Signed-off-by: Ron Gebauer <ron.gebauer@raytion.com>

* Add feedback

Signed-off-by: Ron Gebauer <ron.gebauer@raytion.com>
2020-05-07 21:02:22 +02:00
Bjorn Neergaard
02e9486559
Fix manpath handling in create_manpage_completions.py (#6879)
* Fix manpath handling in create_manpage_completions.py

...as well as do some (very!) light cleanup.

Currently, `create_manpage_completions.py` does not properly
understand/respect the `$MANPATH` variable. One important feature of
`$MANPATH` is that an empty component (i.e. the trailing : in
`foo:bar:`) expands to the 'default' or 'system' path -- that is to say,
the path that would be used if `$MANPATH` was unset. This allows the
user to extend the manpath without clobbering it, and has been a feature
many Unices have included for years.

The current implementation blindly uses the `$MANPATH` variable if it
exists, which does not allow for this behaviour -- to expand the
variable correctly, an external program must be invoked. Therefore, we
first shell out to the 'proper' (read: best guess) external program. If
that fails, we can then try to use `$MANPATH` directly/literally.
Finally, if both of those are impossible, we can fall back to some
common paths from widely used operating systems.

Note that the `man.conf` parsing has been removed: this is because while
many 'traditional' Unices (BSDs, Solaris, macOS) support this file, only
macOS actually ships a file -- most other Unices use a `conf.d`-style
layout and supporting that from our Python is impractical and silly at
best. On GNU (read: Linux) systems, `mandb` uses `/etc/man_db.conf` with
slightly different syntax and sematics. As this code-path has bitrotted
(and likely never worked, anyway), just remove it.

`create_manpage_completions.py` looks like it has suffered a lot of
confusion and bitrot in general over the last few years -- and is
overdue for a major refactoring. I am quite interested in tackling this,
but I plan to wait until the go-ahead to drop support for Python 2 is
given, as a major refactor/rewrite that still supports Python 2 (and
thus ignores the ergonomic/API/syntax improvements of Python 3) does not
make sense to me.

Related: #5657

It would probably be good to revisit `man.fish` once again when a
comprehensive refactor happens: hopefully every permutation of
`man`/`$MANPATH` could be documented as part of that effort.

* Restore /etc/man.conf parsing

I was not aware that this codepath was used -- since it appeared that it
would throw an error when it was reached. Redo it, using regex, and
support parsing NetBSD man.conf as well (untested).

* Fix create_manpage_completions.py under Python 2
2020-05-07 21:01:02 +02:00
Fabian Homborg
3c6c8d5424 fish_vi_cursor: Add alacritty to the whitelist 2020-05-07 18:04:39 +02:00
David Adam
ec74c739c8 bindings: expand abbreviations with all end-of-command characters
Closes #6970.
2020-05-07 09:13:33 +08:00
Charles Gould
bd472ececc Add fish_trace to special variable completions 2020-05-03 21:20:24 +08:00
Fabian Homborg
3e29b0d916 fish_vi_cursor: Allow new Konsole
It removed $KONSOLE_PROFILE_NAME and added $KONSOLE_VERSION.

Let's assume if $KONSOLE_PROFILE_NAME is set we use the old sequences,
if not we use the new ones.
2020-05-02 17:42:42 +02:00
David Adam
f36c82ce86 Reenable command descriptions on macOS 10.15.4+
Further work on #6270, as recommended in 611a6589ea.

[ci skip]
2020-05-01 21:28:43 +08:00
ridiculousfish
a1494c9c22 Revert "__fish_describe_command: print only exact match and exit"
This reverts commit 535845861a.

That commit introduced a bug where tab-completing commands no longer
prints their descriptions, unless there is an exact match.
2020-04-30 11:09:46 -07:00
hyperfekt
31cb615671 __fish_config_interactive: use __fish_anypython 2020-04-29 14:17:16 +08:00
George Christou
2bc4228d42 edit_command_buffer: Add line:col support for Sublime Text 2020-04-28 08:48:31 +02:00
LawAbidingCactus
ad677d388c fix pushd 2020-04-26 14:39:15 +02:00
Fabian Homborg
1988bd2579 completions/git: Only use first line of alias as the description
This was a weird one. We split the aliases correctly even with
multiple lines, but then broke it all again when we just printed the
description.

Note that it would be possible to use `string split0` here, but since
anything longer than a line is likely too long for a description
anyway we don't bother.

Fixes #6946.
2020-04-26 08:49:01 +02:00
Fabian Homborg
713ceddf0b Add another test for Konsole
For some reason my current version doesn't have $KONSOLE_PROFILE_NAME
anymore, it has $KONSOLE_VERSION.

Urgh
2020-04-25 18:01:43 +02:00
Fabian Homborg
fd90482c19 create_manpage_completions: Output "-d", not "--description"
We typically use "-d" because it's shorter.
2020-04-25 11:34:52 +02:00
Fabian Homborg
5ca527b2fe create_manpage_completions: Remove trailing period
Turns out this was on purpose, but we've been telling people to do
away with them for quite a while.
2020-04-25 11:34:40 +02:00
exploide
c0542727c4 added completions for metasploit commands
- msfconsole
- msfdb
- msfvenom
2020-04-25 09:30:09 +02:00
Jason
bd44c3a5cb Shorten descriptions 2020-04-25 09:29:42 +02:00
Fabian Homborg
47677dfe95
Merge #6788
Completions update
2020-04-25 09:29:01 +02:00
Ron Gebauer
d256ff84f7
Improve gradle completion (#6864)
* Improve gradle completion a lot

Signed-off-by: Ron Gebauer <ron.gebauer@raytion.com>
2020-04-25 09:22:07 +02:00
Kid
6022d216cb
Update Yarn completions (#6821)
* Update `yarn global` command

* Add descriptions
2020-04-25 09:21:05 +02:00
239
4d596a8f1d
Merge branch 'master' into completions-update 2020-04-23 14:01:42 +02:00
Fabian Homborg
c7c10c8b10 __fish_ps: Use builtin realpath
We might want to find a better home for that builtin.
2020-04-21 21:11:26 +02:00
Fabian Homborg
18b2a65fdc Remove unused --inherit-variable 2020-04-21 21:11:26 +02:00
Fabian Homborg
6ebbe5a450 fish_clipboard_copy: Stop adding newlines
When this switched over from directly piping commandline to storing
its output and using printf, I inadvertently always added a trailing
newline. That's probably annoying.

Note that this will now always *remove* a trailing newline (because
the command substitution does). That will barely make a
difference (because trailing newlines are quite unusual in the
commandline) and will probably feel better than keeping it - we could
even make a point of removing trailing whitespace in general.

Fixes #6927
2020-04-21 07:26:27 +02:00
Jason Nader
f66285d7a1 dogfood string split -f 2020-04-20 22:39:48 +02:00
Fabian Homborg
3f95440f26 completions: Use commandline -opc, not just -o
`commandline -o` tokenizes *the entire commandline buffer*.

See #6922.
2020-04-20 19:43:01 +02:00
Charles Gould
2421eb6180 docs: Add completions for fish_key_reader 2020-04-19 07:06:31 +02:00
Johannes Altmanninger
9c6e81a838 Support busybox ps in process completions
Fixes #6918
2020-04-19 05:51:25 +02:00
Alan Somers
3d0581d195 fish_hg_prompt should return 1 when not in a mercurial directory 2020-04-19 04:24:28 +02:00
Joel Kuhn
a3dfa21737 Change vi-mode tilde to toggle character case
This updates the behavior of tilde to match the behavior found in vim.
In vim, tilde toggles the case of the character under the cursor and
advances one character. In visual mode, the case of each selected
character is toggled, the cursor position moves to the beginning of
the selection, and the mode is changed to normal. In fish, tilde
capitalizes the current letter and advances one word. There is no
current tilde command for visual mode in fish.

This patch adds the readline commands `togglecase-letter` and
`togglecase-selection` to match the behavior of vim more closely. The
only difference is that in visual mode, the cursor is not modified.
Modifying the cursor in visual mode would require either moving it in
`togglecase-selection`, which seems outside its scope or adding
something like a `move-to-selection-start` readline command.
2020-04-18 14:59:37 +02:00
Jouke Witteveen
93b86bbe63 systemctl completions: Use --plain where appropriate
The --plain flag drops the '●'-glyph and generally makes the output more
suitable for automated processing.
2020-04-18 11:11:27 +02:00
exploide
8e418f5205 updated su completions 2020-04-18 10:54:06 +02:00
Jason Nader
85a8deabe9 Run fish_indent on all files 2020-04-18 10:53:11 +02:00
Fabian Homborg
157469038f completions/duply: Stringify
This used a hardcoded "/bin/ls" for unknown reasons.

For one that's unnecessary, for another we don't want to parse string.

Use globs instead.
2020-04-18 10:29:18 +02:00
Fabian Homborg
6004d04da6 completions/rmmod: Stop hardcoding lsmod location
No idea what that was supposed to accomplish to begin with.

Fixes #6912
2020-04-18 10:26:55 +02:00
Johannes Altmanninger
be36c96028 alias.fish: unbreak listing aliases without backslashes
The description for an alias which already has escape sequences will
use backslash escapes for quoting; usually `string escape` can simply
quote it.  Use a regex that accepts either escaping style.
2020-04-18 09:35:33 +02:00
Johannes Altmanninger
9eb2b69a51 alias.fish: list aliases that are escaped, not quoted
Fixes #6910
2020-04-17 23:16:43 +02:00
jeanprey
052d8d3a10 Activate untracked status in hg prompt
Correction of a typo that prevented the display of untracked status on the detailed prompt.
2020-04-16 19:18:22 +02:00
David Adam
021679b17c completions/nc.traditional: add missing fish suffix to file
Noted in
https://github.com/fish-shell/fish-shell/pull/6873#issuecomment-614290625
2020-04-16 23:17:02 +08:00
Benjamin Kellermann
de9f4cb252 add completion for netcat
- implement the most common netcat variants on Linux
  - nc.openbsd
  - nc.traditional
  - nc/netcat tries to guess which netcat is currently used
2020-04-13 23:45:40 +02:00
Benjamin Kellermann
0a40a6d551 add completion for nmap 2020-04-13 23:45:40 +02:00
Johannes Altmanninger
671b941b52 Fix ninja target completions without the -C flag 2020-04-13 22:56:22 +02:00
exploide
82b811281d added completions for groups (coreutils) 2020-04-13 22:56:22 +02:00
Jason Nader
d278ff4e45 Use the new string split --fields feature 2020-04-12 14:01:21 -07:00
exploide
ee180988d1 sftp completions 2020-04-11 13:24:35 +02:00
Shun Sakai
4f60693037 Add completions for Zopfli 2020-04-11 13:13:56 +02:00
Charles Gould
8029f15f1f git prompt: better check for git stashes
When you run "git gc":

 - .git/refs/stash is deleted
 - .git/logs/refs/stash is kept intact
2020-04-10 00:22:16 +02:00
xnumad
af5a9cf88e It's wget --bind-address
Fixes typo
2020-04-09 23:49:27 +08:00
Artur Juraszek
33bc2bc312 Allow unzip versions not patched by Debian to enjoy .{jar,aar} completions
A minor follow-up to #6866 (e658a88ab0).
These file types should be properly handled by other unzip flavors too,
regardless of Debian's/non-Linux Unixes' idiosyncrasies.
2020-04-07 22:47:38 +02:00
exploide
8025e80fdb new function __fish_preview_current_file to open file at the cursor in pager
bound to Alt+O by shared key bindings
created with help from @krobelus
fixes #6838
2020-04-07 22:30:05 +02:00
Thom Chiovoloni
39e0fd14eb Allow man completions on catalina if apropos is overridden
It's pretty easy to fix catalina's apropos with a small tweak, so it
would be nice if man completions worked if this is done.
2020-04-06 19:13:12 +02:00
Thom Chiovoloni
e658a88ab0 Support .jar and .aar files in unzip completions
I've been dealing with these a lot recently (android dev...), and it's
pretty annoying that unzip completions don't recognize them (They're
just zip files with a weird file extension).
2020-04-06 19:12:03 +02:00
Fabian Homborg
ff68bdceba Allow file completions for more builtins
- contains
- count (for `count *`)
- echo
- printf
- random (for `random choice`)

Fixes #6520
2020-04-06 18:59:10 +02:00
Fabian Homborg
6a721fab63 Let . and : be completed with files
For `.` it's *correct* and for `:` it literally accepts everything
2020-04-06 18:56:10 +02:00
Fabian Homborg
5dfaff4281 Make "." a builtin as well
Yeah, it's not going anywhere. This is one line in builtin.cpp vs 9
lines of script, most of which used to print an error that is never triggered.
2020-04-06 18:55:59 +02:00
Fabian Homborg
be0de5e2de Just define a ":" builtin
It's *less code* to define this as a builtin, and it's not going
anywhere. Plus it makes fish just a little more usable without share/config.fish.
2020-04-06 18:55:59 +02:00
Ron Gebauer
77fb54fa99 In Fish MD5 on BSD now use given String and not -s
Signed-off-by: Ron Gebauer <ron.gebauer@raytion.com>
2020-04-05 17:25:02 -07:00
Fabian Homborg
b42445e675 Restyle create_manpage_completions 2020-04-05 10:13:02 +02:00
Johannes Altmanninger
89c4ff9eae Fix some inconsistencies in docs 2020-04-04 19:19:50 +02:00
Johannes Altmanninger
fd18cba4bc Add completions for builtin wait 2020-04-04 19:19:50 +02:00
Fabian Homborg
af03f2ce6d create_manpage_completions: Switch to argparse
This is a lot cleaner and more easily extendable.
2020-04-04 15:30:09 +02:00
Fabian Homborg
6e95e1d79d create_manpage_completions: Change "--save" to "--keep" 2020-04-04 15:30:09 +02:00
JanczarKnurek
f212aba174 Allow not to remove files from destination dir
Signed-off-by: JanczarKnurek <jacek@beit.tech>
2020-04-04 15:30:09 +02:00
Jason Nader
30459b053f more dogfood 2020-04-04 15:30:09 +02:00
Jason Nader
eaf313f755 Dogfooding to show off use case 2020-04-04 15:30:09 +02:00
Jason Nader
7cb1d3a646 Add string split --fields 2020-04-04 15:30:08 +02:00
Johannes Altmanninger
4884a4080e completions: pass the correct args to git and ninja 2020-04-02 09:44:15 +02:00
exploide
67eaefeb82 added openssl completions 2020-04-02 09:31:13 +02:00
Delapouite
fb5c64641c feat(completions): add long 'list' option for prevd and nextd 2020-04-02 09:26:15 +02:00
239
1792be096a
Merge branch 'master' into completions-update 2020-03-31 14:43:40 +02:00
Delapouite
9459958c61 feat(completion): add missing -P option to read command 2020-03-30 19:37:42 +02:00
Johannes Altmanninger
08b301721f Fix file completions for tig/gitk after -- separator [ci skip] 2020-03-29 23:11:08 +02:00
exploide
f7eb3afa11 updates nc completions 2020-03-29 16:02:53 +02:00
Johannes Altmanninger
e49b4df562 fixup! Fix GNU Make completions when specifying a directory with -C
Whoops!
2020-03-29 11:17:29 +02:00
Johannes Altmanninger
79566bc325 Fix GNU Make completions when specifying a directory with -C
Make is much better than us at figuring out which makefile to use,
just pass through the relevant parameters.

Also previously they didn't work at all for Makefiles like the one in
https://github.com/jonas/tig, for example.
2020-03-29 11:05:40 +02:00
Fabian Homborg
54d580cf94 Simplify __fish_expand_pid_args 2020-03-28 09:50:37 +01:00
Fabian Homborg
1b0ec21773 __fish_config_interactive: Remove a "is-interactive" check
This looks like a copy-paste error. If we're in
__fish_config_interactive, we're *interactive*.
2020-03-28 09:50:37 +01:00
exploide
23339ae15a added mysql completions 2020-03-28 08:25:06 +01:00
Johannes Altmanninger
15817a0b07 Fix git ranges completion, add gitk and tig
[ci skip]
2020-03-27 22:23:26 +01:00
Fabian Homborg
1406d63b85 Restyle
I kinda hate how fussy clang-format is. It reflows text
constantly (line limit), forces things onto one line *except* when
they're too long, and wants to turn this:

```c++
    return true;;
```

into this:

```c++
    return true;
    ;
```

instead of, you know, eliminating the second semicolon?

Anyway, it is what it is and we use it, I'll just look into getting some
more slack.
2020-03-26 20:45:40 +01:00
Jason Nader
69afb1b560 Update apropos completions 2020-03-26 17:12:33 +01:00
Fabian Homborg
911465a8e7 completions/gcc: Moar descriptions 2020-03-25 22:55:58 +01:00
Fabian Homborg
356b35e446 completions/gcc: Improve some descriptions
This file is autogenerated, and these descriptions need quite a
cleanup.

This does the first 10% or so.

[ci skip]
2020-03-25 20:18:11 +01:00
exploide
85d6d90bf7 added completions for traceroute and tracepath 2020-03-25 18:27:56 +01:00
Matthieu Guilbert
314f4c48fc Update terraform completion
Add completion for terraform worskpace.

The terraform env command is deprecated.
The terraform workspace command should be used instead.
"terraform env" will be removed in a future Terraform version.
2020-03-25 18:25:19 +01:00
JanczarKnurek
e78ed51747 Add flag names to usage line
Signed-off-by: JanczarKnurek <jacek@beit.tech>
2020-03-24 21:04:29 +01:00
JanczarKnurek
b1c14cf084 Add missing flags desc to script
create_manpage_completions now has all flags in help

Signed-off-by: JanczarKnurek <jacek@beit.tech>
2020-03-24 21:04:29 +01:00
Johannes Altmanninger
aa304cbd3d Restore directory completions for subcommands
Fixes #6798

This re-adds some false positives: functions, builtins and abbreviations
are suggested after commands like sudo but I don't think anyone had
complained about that.
2020-03-24 20:18:07 +01:00
Fabian Homborg
52f819cd35 sample_prompts/nim: Add vi mode indicator
The default indicator ruined alignment, which is a major design
feature here.

Handle it by including the mode indicator in the prompt proper.

Fixes #6802.

[ci skip]
2020-03-24 17:08:19 +01:00
Johannes Altmanninger
d0bedf3bbd help.fish: only use cmd.exe on WSL
Fixes #6797
2020-03-23 21:02:15 +01:00
George Christou
a3436110c1
Add string sub --end (#6765) 2020-03-22 15:53:09 +01:00
239
232f89afb2 Indent completions 2020-03-22 14:29:35 +01:00
239
260666b545 Remove fd completions 2020-03-22 14:27:49 +01:00
Jason Nader
979d3a18aa help function: special case string xxx 2020-03-22 09:33:07 +01:00
239
749d471d87 Update completions for zpaq 2020-03-21 16:51:01 +01:00
239
3c855e0366 Add completions for Windscribe 2020-03-21 16:49:03 +01:00
239
b677899f1e Update completions for resolvectl 2020-03-21 16:48:06 +01:00
239
2be7f1a7e6 Update completions for loginctl 2020-03-21 16:47:28 +01:00
239
581f619147 Update completions for Keybase 2020-03-21 16:46:35 +01:00
239
3cd662e9ae Add completions for fd 2020-03-21 16:45:31 +01:00
239
69c8496cb8 Update completion for cryptsetup 2020-03-21 16:44:04 +01:00
Fabian Homborg
8ddd512fba Refine when we expand abbreviations
- ctrl-space will insert a space without expanding abbrs
- ")" or alt-enter will expand abbrs

Fixes #6658
2020-03-21 13:55:15 +01:00
Jon Cinque
23a21eb318 Add vi 'y' bindings and some i / a support
Many people have mentioned wanting support for changing / yanking /
deleting between "" and '', meaning the commands `ci' ci" yi' yi" di' di"`,
so this adds that support in a generic, and thus potentially confusing way.
The concept is that we check for the character backwards and forwards
before making the selection.  Unfortunately, this will also work for *any*
character that isn't `w` or `W`, so `cia` could change everything between
two `a` characters.
Looking through the [bind documentation](https://fishshell.com/docs/current/cmds/bind.html)
and input handler at `src/input.cpp`,
this is the best possible solution I could come up with until
`forward-jump` and `backward-jump` can accept input in the call to `bind`,
and not just from stdin, meaning we can write a binding as:
```
bind di\" backward-jump-till \" and repeat-jump-reverse ...`
```
If that were done, then other commands such as `di)` to go between `()` would
be possible.
There are also some added `y` bindings not part of #6648.
Let me know if you need anything else.
2020-03-21 13:52:12 +01:00
Jason Nader
c4156677cc Remove unnecessary use of begin 2020-03-21 13:26:58 +01:00
Jason Nader
eba099bf77 Fix abook completions 2020-03-21 13:22:32 +01:00
Delapouite
6b73079e27 feat: add missing 'save' completion for funced 2020-03-19 21:55:40 +01:00
Jason Nader
0d43615af2 Update completions for read builtin 2020-03-19 18:23:17 +01:00
Sam Yu
bbb4a63d67 Fix zypper completion
Fix packages completion for `zypper download`
2020-03-16 19:09:16 +01:00
Fabian Homborg
1e2e511570 fish_default_key_bindings: Remove outdated stderr silencing
We *always* silence `bind` here, so we don't need to specifically
silence for these keys.
2020-03-15 21:01:11 +01:00
Fabian Homborg
aa629c5aca Reformat fish scripts with escaped newline changes to fish_indent 2020-03-15 21:01:11 +01:00
Fabian Homborg
463b9b99c6 Move ctrl-left/right forward-word to shared bindings
These also work in vim.

Fixes #6755.
2020-03-15 13:24:45 +01:00
Jason Nader
266ce7c940 Improve Arch Linux package completions
Add completions for `downgrade` tool
Add new `--installed` option for printing Arch packages
Change Arch Linux package related completions to use `--installed`

add newline
2020-03-15 13:19:25 +01:00
Jason Nader
0f681190ba Fix screen optarg completions as they require a space 2020-03-15 10:21:33 +01:00
Johannes Altmanninger
f665cd6367 completions/kak.fish: use old style instead of short options
Kakoune does not accept grouped short options, or option
arguments without a separating space.
2020-03-15 08:50:21 +01:00
Tim Sampson
5cf24b7733 completions: add basic completions for 'ip netns' 2020-03-14 15:47:25 +01:00
Johannes Altmanninger
651f3cf863 Fix VSCode not blocking in edit_command_buffer 2020-03-14 14:15:10 +01:00
Delapouite
a7f62df958 feat: add missing 'current-selection' completion for commandline
Related to #4255
2020-03-14 12:50:40 +01:00
exploide
a2a12ffda2 removed wrong escaping in completion descriptions 2020-03-14 12:07:58 +01:00
Fabian Homborg
db7dfddc3b completions/systemctl: Remove annoying marker
The output of

systemctl list-units

seems to include a marker of '●' or '*' for some units, even if the
output is not going to a terminal and "--no-legend" and "--no-pager"
are given. This appears
to be a recent development, and there does not appear to be a flag to
disable it.

So we simply filter it out in the completions to once again hopefully
offer the actual units.

Fixes #6740
2020-03-12 18:37:32 +01:00
Fabian Homborg
5ab1e2dc0f help: Always use xdg-open if available
Even if $DISPLAY is unset, xdg-open can be useful, and on systems that
have xdg-open, "open" is most likely some god awful outdated thing
called "openvt" elsewhere.

Fixes #6739

[ci skip]
2020-03-12 17:27:37 +01:00
Johannes Altmanninger
c5e4419097 Add "--" safeguards at string length [ci skip] 2020-03-10 21:01:00 +01:00
Johannes Altmanninger
208b0f9dd5 Interactive config: remove useless argument and correct redirection 2020-03-10 20:56:45 +01:00
Johannes Altmanninger
685b668958 Complete IDs for unix users and groups that start with _ 2020-03-10 20:56:45 +01:00
Fabian Homborg
0af6d36bb8
Merge pull request #6731 from ammgws/complete-gvim
update gvim completions
2020-03-10 18:24:26 +01:00
Jason Nader
7fb3880b96 completions: remove unnecessary use of --erase 2020-03-10 18:10:49 +01:00
Jason Nader
faa75d74d2
Update gvim completions 2020-03-10 23:52:00 +09:00
Fabian Homborg
9367d4ff71 Reindent functions to remove useless quotes
This does not include checks/function.fish because that currently
includes a "; end" in a message that indent would remove, breaking the test.
2020-03-09 19:46:43 +01:00
Fabian Homborg
750e6fa663 completions/openocd: Stop using "which"
"which" is useless.
2020-03-09 19:46:43 +01:00
rnhmjoj
81668b3f86 completions: fix scp remote path when /bin/ls does not exist 2020-03-09 19:21:43 +01:00
exploide
eac6252ab9 improved find completions 2020-03-08 17:24:14 +01:00
exploide
f39cba1d9f added functions to complete user and group IDs 2020-03-08 17:24:14 +01:00
Johannes Altmanninger
660182cfb3 completions/zfs: finish renaming from 05038fc8 2020-03-08 10:00:57 +01:00
Johannes Altmanninger
01d9e56bdd completions/zfs: fix syntax error from f507f4ad 2020-03-08 10:00:57 +01:00
ridiculousfish
29c2bce704 Use self-insert-notfirst on spaces during paste
This changes a5a643f854 to use the new self-insert-notfirst binding.
It also adds a test.
2020-03-07 13:31:55 -08:00
Jason Nader
926c1f1016 Privatise completion-only funtions 2020-03-07 13:26:27 -08:00
Johannes Altmanninger
52dfb146d1 Fix vscode completion
[ci skip]
2020-03-07 21:24:14 +01:00
Johannes Altmanninger
87728c4d0d Pass cursor position to edit_command_buffer for some editors
Fixes #6138

Naturally this does not work for many other editors/aliases,
but it's still nice that we can make it work for some common
editors without requiring any configuration.

Of course this approach is not terribly flexible; but it's
alwyas possible to just wrap edit_command_buffer and set an
EDITOR that knows about the cursor position. It doesn't
feel important enough to add a configuration option.
2020-03-07 21:24:14 +01:00
Johannes Altmanninger
27e88adcd5 Re-fix cargo completions
Using a local variable means we have to expand it when loading the
completion.  With this approach, the content of the variable will be
expanded, so escape it.
2020-03-07 19:54:50 +01:00
Fabian Homborg
db62953e0f completions/cargo: Add remaining bits of #6717
A nicer variable scope and no more erasing completions.

[ci skip]
2020-03-07 19:38:23 +01:00
Mahmoud Al-Qudsi
4a3ffe741c Partilaly revert 0b7bbb5654
The changes to the `cargo` completions resulted in screenfuls of junk
being dumped to the tty on `cargo pu<TAB>`.
2020-03-07 08:44:00 -06:00
Johannes Altmanninger
917f759a1a prompt: don't consider SIGPIPE a failure
Reproduce by running git log and press "q".
This regressed in master in 5d135d5.

[ci skip]
2020-03-07 14:13:58 +01:00
Johannes Altmanninger
da7b762f4a Make default hg prompt leaner
The default hg prompt is slow on large repositories (hg status takes
2-3 seconds on mozilla-central) which is unacceptable as a default.

Mimick our git prompt: by default, only show the current branch.
If the new variable $fish_prompt_hg_show_informative_status is set,
then use the old behavior.

[ci skip]
2020-03-07 13:02:58 +01:00
Jason Nader
b4626468ec completion helper functions: do not use gettext
remove package
2020-03-06 22:23:50 +01:00
Jason Nader
12ce66684e completions: add mpv 2020-03-06 22:22:52 +01:00
exploide
61de39bd68 updated grep completion
added group-seperator options to grep completion
distinguished between -r and -R
removed deprecated option
2020-03-04 11:31:05 -08:00
Jason Nader
97d5f68cdf completions: update ftp 2020-03-04 10:26:54 -08:00
Jason Nader
3774edba93 completions: add imv 2020-03-03 18:32:53 +01:00
Jason Nader
4b95f2c5ee completions: add ps2pdf wrapper functions 2020-03-03 18:32:13 +01:00
exploide
e48ef850b9 added completions for tcpdump 2020-03-03 18:31:42 +01:00
Fabian Homborg
4f47636838 fish_print_hostnames: Fix multiple host aliases
Fixes #6698.

[ci skip]
2020-03-03 18:30:06 +01:00
Jason Nader
86b7c1034c Prevent prompt from spewing errors if cwd has disappeared 2020-03-03 18:06:20 +01:00
Jason Nader
c5d6a54462 completions: update GNU wc options 2020-03-02 22:21:12 +01:00
Jason Nader
9c8fff08c1 fish_npm_helper: fix typo in comments 2020-03-02 21:36:11 +08:00
Fabian Homborg
0f34459fce Disable svn prompt by default
This is apparently quite slow on large svn repos (like 40 seconds
slow), and we don't have a good thing to display other than the full
file information.

So we'll have to disable it for now.

Fixes #6681.

[ci skip]
2020-03-01 17:04:02 +01:00
Jason Nader
f897948442 completions: update rfkill 2020-03-01 13:48:36 +01:00
Jason Nader
49bdab4898 completions: update timeout 2020-03-01 13:47:53 +01:00
exploide
41e6d4cc9c added completion for dhclient 2020-03-01 13:46:21 +01:00
akspecs
23f942b315 added uncompressed pkg.tar files for completion 2020-03-01 13:45:20 +01:00
Jason Nader
fed0e0833d Run fish_indent on completions 2020-03-01 13:44:51 +01:00
Jason Nader
950e2be7a3 python: add new completions 2020-02-28 11:31:57 +01:00
Jason Nader
1f42c30114 python: shorten completion description 2020-02-28 11:31:57 +01:00
Jason Nader
5785555afb ncdu: update completions 2020-02-28 11:31:20 +01:00
Jason Nader
e2ed4ec014 Add check for locale cmd 2020-02-28 11:29:54 +01:00
Jason Nader
f507f4ad1e Ddon't use gettext fn in fish functions 2020-02-28 11:29:54 +01:00
Jason Nader
adfe8d681d Ensure stdin is redirected to python 2020-02-28 11:23:58 +01:00
Jason Nader
45b1ca25a5 Speed up python startup time 2020-02-28 11:23:58 +01:00
Jason Nader
82ab7e39f0 mupdf: update completions
[skip-ci]
2020-02-28 11:17:38 +01:00
Jason Nader
39e6570d73 pkginfo: add pypi/pkginfo completions 2020-02-28 11:17:38 +01:00
Jason Nader
94a3a5ff37 telnet: remove gettext cruft 2020-02-28 11:17:38 +01:00
Jason Nader
5fa05d0504 telnet: update completions
GNU: https://www.gnu.org/software/inetutils/manual/html_node/telnet-invocation.html
FreeBSD: https://www.freebsd.org/cgi/man.cgi?telnet
OpenBSD: https://man.openbsd.org/telnet.1
NetBSD: https://netbsd.gw.com/cgi-bin/man-cgi?telnet+1.i386+NetBSD-8.0

[skip-ci]
2020-02-28 11:17:38 +01:00
Jason Nader
3279661e3a whatis: add option completions
[skip-ci]
2020-02-28 11:17:38 +01:00
Jan Verbeek
d02736c0ce
Improve psql completions and add some related commands (#6620) 2020-02-28 11:16:41 +01:00
Jason Nader
6052758c28 Add strace completions (basic) 2020-02-26 16:32:58 +01:00
Fabian Homborg
cebfaa7786 completions/git: Work around read trimming whitespace
Since #6406, read will trim whitespace before the last variable.

In this case there is only one variable, and the line looks like

 M CHANGELOG.md

so it does indeed start with whitespace, and the whitespace is quite
significant.

Fixes #6650.

[ci skip]
2020-02-25 18:53:46 +01:00
Simon Rainer
e1a08e3f58 Add additional vi bindings
Adds dh, dl, c0, cf, ct, cF, cT, ch, cl, and y0 bindings.
2020-02-24 00:05:14 -08:00
Jason Nader
0b7bbb5654 cleanup completions: localise/erase vars where possible
[skip-ci]
2020-02-23 11:10:32 +01:00
Jason Nader
90bd4aa2a1 lscpu.fish: disable file completions, localise var 2020-02-23 09:41:32 +01:00
David Adam
f036d01961 drop rg and bat completions
These are shipped upstream.

Closes #5822.
2020-02-22 22:23:40 +08:00
Daniel Zhang
ff29d81532 Fix variable leaking in completion kill 2020-02-22 11:25:47 +01:00
Fabian Homborg
fb7af4eff2
Merge pull request #6581 from brunelli/master
Fix flatpak completion
2020-02-20 19:15:48 +01:00
Fabian Homborg
8195889dba completions/mvn: Shorten descriptions
Bleedin' heck these were long and useless!

[ci skip]
2020-02-20 19:13:16 +01:00
David Adam
45fb2024f8 completions: drop shebang from non-executable files
These completion files do not get marked as executable, so they don't
need a shebang.
2020-02-18 21:34:19 +08:00
Mahmoud Al-Qudsi
535845861a __fish_describe_command: print only exact match and exit
Mimic the behavior of Linux's `apropos -e` and ~BSD's `apropos -f` with
the awk script by disallowing trailing characters in the name of the
manpage as compared to the original input string. Apart from being
faster (by aborting earlier and stopping `apropos` by breaking the pipe
after the first match), it's also more correct.
2020-02-17 20:22:39 -06:00
Mahmoud Al-Qudsi
3c7019b335 __fish_describe_command: check for apropos only at startup 2020-02-17 20:13:39 -06:00
Mahmoud Al-Qudsi
5510443f48 __fish_describe_command: Remove regex escape hack 2020-02-17 20:13:30 -06:00
Fabian Homborg
65883e0e40 Restyle
Mostly line breaks, one instance of tabs!

For some reason clang-format insists on two spaces before a same-line comment?

(I continue to be unimpressed with super-strict line length limits,
but I continue to believe in automatic styling, so it is what it is)

[ci skip]
2020-02-17 14:14:05 +01:00
Jason Nader
a619f69b15 Rename functions to match others 2020-02-17 09:55:05 +01:00
Fabian Homborg
63b4a891ff completions/optipng: Add missing quote
Oops!

This should be in 3.1.1!

cc @zanchey
2020-02-17 08:57:41 +01:00
Fabian Homborg
96587d26f5 completions/rbenv: Fix error spew
Fixes #6617
2020-02-17 08:57:41 +01:00
Aaron Gyes
b1bbb58af6 Reword open completion descriptions, don't use sed
Fixes issue with (null) junk in -b completions
2020-02-14 14:45:23 -08:00
Fabian Homborg
56040d2d7f completions/npm: Allow files for "install"
Fixes #6596

[ci skip]
2020-02-14 17:57:07 +01:00
Ian Brunelli
f456404482 Simplify flatversion extraction 2020-02-13 22:00:23 -03:00
Ian Brunelli
7516c408ae Add description to flatpak remote completion 2020-02-12 16:54:54 -03:00
Ian Brunelli
e0551a184d Add completion for flatpak enter and kill 2020-02-12 16:39:50 -03:00