mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-24 23:04:22 +08:00
4d909b1c19
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).
7 lines
440 B
Fish
7 lines
440 B
Fish
# 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 '^@' '') ''))"
|