fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
a53db7256
master
1# localization: skip(private) 2function __fish_reg__complete_keys 3set -l current_token( commandline -tc| string unescape) 4 5set -l default_keys'HKEY_CLASSES_ROOT\tThe information about file extension associations' \ 6'HKEY_CURRENT_USER\tThe information about a current user' \ 7'HKEY_LOCAL_MACHINE\tThe information about a current machine' \ 8'HKEY_USERS\tThe information about loaded users' \ 9'HKEY_CURRENT_CONFIG\tThe information about hardware used while startup' \ 10 HKEY_DYN_DATA 11 12if string match --quiet --entire --regex'\\\\' --" $current_token " 13set current_token( string replace --regex'\\\\[^\\\\]*$' '' --" $current_token " ) 14 15set -l keys( WINEDEBUG=-all wine reg query" $current_token " | 16string replace --regex'\r' '' | 17string match --entire --regex'\w' ) 18 19test $pipestatus [ 1 ] != 0 && return 20 21string join\n --$keys | 22string match --invert" $current_token " | 23string replace --all --regex'[\\\\]+' '\\\\' 24else 25for keyin $default_keys 26echo -e$key 27end 28end 29end 30 31complete -c true -a'(__fish_reg__complete_keys)'