|
Server IP : 161.35.85.9 / Your IP : 216.73.217.138 Web Server : nginx/1.30.4 System : Linux cheapdeb-ams3 7.1.13+deb14-amd64 #1 SMP PREEMPT_DYNAMIC Debian 7.1.13-1 (2026-09-03) x86_64 User : root ( 0) PHP Version : 8.2.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/share/fish/functions/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
# localization: skip(private)
#
# Helper function for contextual autocompletion of GPG crypto algorithm options
function __fish_print_gpg_algo -d "Complete using all algorithms of the type specified in argv[2] supported by gpg. argv[2] is a regexp" -a __fish_complete_gpg_command
# Set a known locale, so that the output format of 'gpg --version'
# is at least somewhat predictable. The locale will automatically
# expire when the function goes out of scope, and the original locale
# will take effect again.
set -lx LC_ALL C
# sed script explained:
# in the line that matches "$argv:"
# define label 'loop'
# if the line ends with a ','
# add next line to buffer
# transliterate '\n' with ' '
# goto loop
# remove everything until the first ':' of the line
# remove all blanks
# transliterate ',' with '\n' (OSX apparently doesn't like '\n' on RHS of the s-command)
# print result
$__fish_complete_gpg_command --version | sed -ne "/$argv[2]:/"'{:loop
/,$/{N; y!\n! !
b loop
}
s!^[^:]*:!!
s![ ]*!!g
y!,!\n!
p
}'
end