fork/fish-shell

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

Johannes AltmanningerMark private functions that don't need localizationa53db7256

master
759 B13 linesraw
1# localization: skip(private)
2
3# Helper function for contextual autocompletion of gpg user ids
4function __fish_complete_gpg_user_id -d "Complete using gpg user ids" -a __fish_complete_gpg_command list_arg
5    # gpg doesn't seem to like it when you use the whole key name as a
6    # completion, so we skip the <EMAIL> part and use it as a description.
7    # It also replaces \x3a from gpg's output with colons.
8    #
9    # TODO: I tried with <EMAIL> and it worked, this was possibly fixed in gpg.
10    # Regardless, it's probably nicer as a description.
11    set -q list_arg[1]; or set list_arg --list-keys
12    $__fish_complete_gpg_command $list_arg --with-colon | string split -a -f 10 : | string replace '\x3a' : | string replace -r '(.*) <(.*)>' '$1\t$2'
13end