Commit Graph

13 Commits

Author SHA1 Message Date
Fabian Boehm
78c9482822 Reformat share/**.fish with newlines collapsed 2024-02-27 16:25:01 +01:00
Johannes Altmanninger
4dae106911 Use complete --keep-order with __fish_complete_suffix to prioritize files with matching suffixes
Part of #7040
2020-12-23 19:14:10 +01:00
Akatsuki
4f0f5daea9 go.fish: add some missing options
also fix long descriptions #6981
2020-09-02 20:58:29 +02:00
Tom Dunlap
dc411b373d Remove "go run" from commands with exclusive args
`go run` compiles and runs a go program passing along the trailing args to the compiled program. Limiting `go run` to only complete *.go files means that if you are running a go file that takes a file path as a command line argument, you frustratingly cannot use tab completion.
2020-08-21 20:40:23 +02:00
Fabian Homborg
f25f15fd69 completions: Fix leftover "^" redirections 2020-06-02 21:43:32 +02: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
69b464bc37 Run fish_indent on all our fish scripts
It's now good enough to do so.

We don't allow grid-alignment:

```fish
complete -c foo -s b -l barnanana -a '(something)'
complete -c foo -s z              -a '(something)'
```

becomes

```fish
complete -c foo -s b -l barnanana -a '(something)'
complete -c foo -s z -a '(something)'
```

It's just more trouble than it is worth.

The one part I'd change:

We align and/or'd parts of an if-condition with the in-block code:

```fish
if true
   and false
    dosomething
end
```

becomes

```fish
if true
    and false
    dosomething
end
```

but it's not used terribly much and if we ever fix it we can just
reindent.
2020-01-13 20:34:22 +01:00
aca
4747bdd7e7 completions/go: add/improve completion
- completion for go mod/generate
- better description for go help
2019-09-26 21:59:41 +02:00
Gustaf Johansson
1270bb265f completions: [go] Lookup pkgs from GOPATH
As defined in the `go help packages`:
  Many commands apply to a set of packages:
    go action [packages]
  Usually, [packages] is a list of import paths.

This patch introduces automatic lookup of said packages from GOPATH
using `go list`, and provides them as options go subcmds.
2018-06-13 15:33:29 +02: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
Clément Martinez
0447ee7b96 Improve go completions 2017-01-31 15:52:55 -08:00
hansstimer
299d803396 Update go.fish
Fix typo for vet subcommand
2013-04-14 16:13:50 -07:00
Hans Stimer
d513ace39d add completion for the Go tool 2013-04-14 16:13:50 -07:00