mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 13:53:10 +00:00
330f1701d7
This mostly fixes some wrong indents or replaces some stray tab indents. I excluded alignment on purpose, because we have a whole bunch of code that goes like ```fish complete -c foo -n 'some-condition' -l someoption complete -c foo -n 'some-longer-condition' -l someotheroption ``` and changing it seems like a larger thing and would include more thrashing. See #3622.
17 lines
667 B
Fish
17 lines
667 B
Fish
# Helper function for contextual autocompletion of GPG key ids
|
|
|
|
function __fish_complete_gpg_key_id -d 'Complete using gpg key ids' -a __fish_complete_gpg_command
|
|
# Use user id as description
|
|
set -l keyid
|
|
$__fish_complete_gpg_command --list-keys --with-colons | while read garbage
|
|
switch $garbage
|
|
# Extract user ids
|
|
case "uid*"
|
|
echo $garbage | cut -d ":" -f 10 | sed -e "s/\\\x3a/:/g" | read uid
|
|
printf "%s\t%s\n" $keyid $uid
|
|
# Extract key fingerprints (no subkeys)
|
|
case "pub*"
|
|
echo $garbage | cut -d ":" -f 5 | read keyid
|
|
end
|
|
end
|
|
end
|