Commit graph

10 commits

Author SHA1 Message Date
Aaron Gyes
b8dee05ad0 completions: remove functions that are never used
None of these __functions defined in completions are used or
referenced anywhere.

Found with:

function unused -a file search -d 'find unused functions'
  set -f (string replace -fr '^[\s]*function ([\w_]+).*' '$1' < $file)
  for cmd in $cmds
    printf %d\ %s\n (grep -r ".*$cmd.*" $search < $argv | count) $cmd
  end | string match '1 *'
end

for file in share/*/*.fish
  unused $file share && printf "in %s\n" $file
end
2022-10-27 23:25:44 -07:00
Aaron Gyes
d1f08d4944 Revert "vagrant completions: use __fish_parent_directories"
This reverts commit 7c1b68516d.
2022-08-03 00:34:32 -07:00
Aaron Gyes
7c1b68516d vagrant completions: use __fish_parent_directories 2022-08-02 22:31:23 -07: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
ce245704d7 Reformat completion scripts
These were excluded from style.fish
2019-05-05 12:53:09 +02:00
Fabian Homborg
eac9ec9093 Add vagrant completions
These aren't perfect, but the tool is pretty much hostile to proper
completions - it includes a "--machine-readable" option, but `vagrant
global-status --machine-readable` prints great output like

```
1551816037,,ui,info,id
1551816037,,ui,info,name
1551816037,,ui,info,provider
1551816037,,ui,info,state
1551816037,,ui,info,directory
1551816037,,ui,info,
1551816037,,ui,info,-------------------------------------------------------------------------
1551816037,,ui,info,d3ea265
1551816037,,ui,info,default
1551816037,,ui,info,virtualbox
1551816037,,ui,info,poweroff
1551816037,,ui,info,/home/alfa/dev/oi-userland
1551816037,,ui,info,
1551816037,,ui,info,fdf42c4
1551816037,,ui,info,default
1551816037,,ui,info,virtualbox
1551816037,,ui,info,poweroff
1551816037,,ui,info,/home/alfa/dev/vagrant/NetBSD
1551816037,,ui,info,
1551816037,,ui,info,f8f6eff
1551816037,,ui,info,default
1551816037,,ui,info,virtualbox
1551816037,,ui,info,poweroff
1551816037,,ui,info,/home/alfa/dev/vagrant/fedora
1551816037,,ui,info,
1551816037,,ui,info, \nThe above shows information about all known Vagrant environments\non this machine. This data is cached and may not be completely\nup-to-date (use "vagrant global-status --prune" to prune invalid\nentries). To interact with any of the machines%!(VAGRANT_COMMA) you can go to that\ndirectory and run Vagrant%!(VAGRANT_COMMA) or you can use the ID directly with\nVagrant commands from any directory. For example:\n"vagrant destroy 1a2b3c4d"
```

and still takes 500ms to do so. The actual information is in a json
file, which we can't expect to read, and it doesn't have linebreaks or
such which we could use to hack-parse it.

So this is the best we can do for the most important bits (the
machineids), so let's just add this as-is.

[ci skip]
2019-03-05 21:02:32 +01:00
Aaron Gyes
68527ff20c completions: --description -> -d
This ends up saving a surprising number of bytes.
2017-10-11 10:17:35 -07:00
Kurtis Rader
8e87d595b7 remove some uses of $IFS
This is a step towards resolving issue #4156. It replaces uses of `$IFS`
with other solutions.
2017-07-24 20:45:43 -07:00
Diego Zamboni
d982f2a575 Vagrant completion updates
Improve vagrant completions for some commands to avoid spurious
completions, and add completions for some missing Vagrant commands.

Fixes #1748.
2014-10-10 15:06:00 -07:00
Ivan Giuliani
e027492e11 Added completions for Vagrant 2013-06-17 00:11:34 -07:00