mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-03 15:01:16 -03:00
refactor gpg.fish completions
refactor gpg completions into functions comment changes; improve gpg version detection [ci skip]
This commit is contained in:
committed by
Johannes Altmanninger
parent
5ce4cb66d3
commit
21a6a192ae
9
share/functions/__fish_complete_gpg_user_id.fish
Normal file
9
share/functions/__fish_complete_gpg_user_id.fish
Normal file
@@ -0,0 +1,9 @@
|
||||
# Helper function for contextual autocompletion of gpg user ids
|
||||
|
||||
function __fish_complete_gpg_user_id -d "Complete using gpg user ids" -a __fish_complete_gpg_command
|
||||
# gpg doesn't seem to like it when you use the whole key name as a
|
||||
# completion, so we skip the <EMAIL> part and use it as a
|
||||
# description.
|
||||
# It also replaces colons with \x3a
|
||||
$__fish_complete_gpg_command --list-keys --with-colon | cut -d : -f 10 | sed -ne 's/\\\x3a/:/g' -e 's/\(.*\) <\(.*\)>/\1'\t'\2/p'
|
||||
end
|
||||
Reference in New Issue
Block a user