mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 05:43:11 +00:00
[openssl] Support openssl 1.1.0 completions
This commit is contained in:
parent
863b4700f8
commit
3f0e2ef1dc
1 changed files with 5 additions and 1 deletions
|
@ -3,5 +3,9 @@ function __fish_openssl_subcommand_options --description "Print options for open
|
|||
openssl list -options $cmd[2] | string replace -r -- '^(\S*)\s*.*' '-$1'
|
||||
end
|
||||
|
||||
complete -c openssl -n __fish_use_subcommand -x -a "(openssl list -1 -commands -cipher-commands -digest-commands)"
|
||||
if command openssl list -1 2>&1 >/dev/null
|
||||
complete -c openssl -n __fish_use_subcommand -x -a "(openssl list -1 -commands -cipher-commands -digest-commands)"
|
||||
else
|
||||
complete -c openssl -n __fish_use_subcommand -x -a "(openssl help 2>&1 | string match -rv '^[A-Z]|^\$' | string split -n ' ')"
|
||||
end
|
||||
complete -c openssl -n 'not __fish_use_subcommand && string match -qr -- "^-" (commandline -ct)' -a "(__fish_openssl_subcommand_options)"
|
||||
|
|
Loading…
Reference in a new issue