Commit Graph

3313 Commits

Author SHA1 Message Date
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
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
Jason Nader
979d3a18aa help function: special case string xxx 2020-03-22 09:33:07 +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