mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 13:53:10 +00:00
added openssl completions
This commit is contained in:
parent
fb5c64641c
commit
67eaefeb82
1 changed files with 7 additions and 0 deletions
7
share/completions/openssl.fish
Normal file
7
share/completions/openssl.fish
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
function __fish_openssl_subcommand_options --description "Print options for openssl subcommand"
|
||||||
|
set -l cmd (commandline -poc)
|
||||||
|
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)"
|
||||||
|
complete -c openssl -n 'not __fish_use_subcommand && string match -qr -- "^-" (commandline -ct)' -a "(__fish_openssl_subcommand_options)"
|
Loading…
Reference in a new issue