fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Fabian BoehmReformat share/**.fish with newlines collapsed78c948282

master
820 B14 linesraw
1if string match -q "OpenSSL*" (command openssl version)
2    # This is real OpenSSL that has the list command.
3    function __fish_openssl_subcommand_options --description "Print options for openssl subcommand"
4        set -l cmd (commandline -pxc)
5        openssl list -options $cmd[2] | string replace -r -- '^(\S*)\s*.*' '-$1'
6    end
7
8    complete -c openssl -n __fish_use_subcommand -x -a "(openssl list -1 -commands -cipher-commands -digest-commands)"
9    complete -c openssl -n 'not __fish_use_subcommand && string match -qr -- "^-" (commandline -ct)' -a "(__fish_openssl_subcommand_options)"
10else
11    # Perhaps LibreSSL - see #7966
12    # TODO: support subcommand options.
13    complete -c openssl -n __fish_use_subcommand -x -a "(openssl help 2>&1 | string match -rv '^[A-Z]|^\$|Error' | string split -n ' ')"
14end