mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-02 22:21:15 -03:00
dogfood string split -f
This commit is contained in:
committed by
Johannes Altmanninger
parent
3bb86d3a61
commit
f66285d7a1
@@ -2,8 +2,7 @@
|
||||
|
||||
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'
|
||||
# completion, so we skip the <EMAIL> part and use it as a description.
|
||||
# It also replaces \x3a from gpg's output with colons.
|
||||
$__fish_complete_gpg_command --list-keys --with-colon | string split -a -f 10 : | string replace '\x3a' : | string replace -rf '(.*) <(.*)>' '$1\t$2'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user