mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Add partial completions for curl, supporting @file syntax
Allows the most painful of curl's arguments to be completed by fish by restoring file-based completions for paths prefixed with `@` (which are typically used after parameters like --data).
This commit is contained in:
parent
6e36b20e42
commit
4d909b1c19
1 changed files with 6 additions and 0 deletions
6
share/completions/curl.fish
Normal file
6
share/completions/curl.fish
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# mqudsi: Given the size and scope of curl's arguments, I don't have the time
|
||||||
|
# to add proper completions, but want to enable path completion for data file
|
||||||
|
# parameters, which allow specifying the path to a payload to upload as @path,
|
||||||
|
# which fish won't complete otherwise.
|
||||||
|
|
||||||
|
complete -c curl -n 'string match -qr "^@" -- (commandline -ct)' -xa "(printf '%s\n' -- @(__fish_complete_suffix (commandline -ct | string replace -r '^@' '') ''))"
|
Loading…
Reference in a new issue