diff --git a/share/completions/gpg.fish b/share/completions/gpg.fish index bb01f0ff6..dbccca0b1 100644 --- a/share/completions/gpg.fish +++ b/share/completions/gpg.fish @@ -53,13 +53,13 @@ function __fish_print_gpg_algo -d "Complete using all algorithms of the type spe # define label 'loop' # if the line ends with a ',' # add next line to buffer - # remove '\n' and following spaces + # transliterate '\n' with ' ' # goto loop # remove everything until the first ':' of the line # remove all blanks # transliterate ',' with '\n' (OSX apparently doesn't like '\n' on RHS of the s-command) # print result - gpg --version | sed -ne "/$argv:/"'{:loop; /,$/{N; s!\n[ ]*! !; b loop}; s!^[^:]*:!!; s![ ]*!!g; y!,!\n!; p}' + gpg --version | sed -ne "/$argv:/"'{:loop; /,$/{N; y!\n! !; b loop}; s!^[^:]*:!!; s![ ]*!!g; y!,!\n!; p}' end diff --git a/share/completions/ssh.fish b/share/completions/ssh.fish index 4f4a1947b..691302982 100644 --- a/share/completions/ssh.fish +++ b/share/completions/ssh.fish @@ -23,6 +23,7 @@ complete -c ssh -s a --description "Disables forwarding of the authentication ag complete -c ssh -s A --description "Enables forwarding of the authentication agent" complete -x -c ssh -s b --description "Interface to transmit from" -a " ( + # TODO /proc/net/arp is not POSIX compliant cut -d ' ' -f 1 /proc/net/arp ^/dev/null | string match -r -v '^IP' ) " diff --git a/share/functions/__fish_print_xdg_mimetypes.fish b/share/functions/__fish_print_xdg_mimetypes.fish index dd1e28c13..5d944a623 100644 --- a/share/functions/__fish_print_xdg_mimetypes.fish +++ b/share/functions/__fish_print_xdg_mimetypes.fish @@ -1,3 +1,3 @@ function __fish_print_xdg_mimetypes --description 'Print XDG mime types' - sed -e '/\[MIME Cache\]/d; y!=!\t!' ~/.local/share/applications/mimeinfo.cache /usr/share/applications/mimeinfo.cache + cat ~/.local/share/applications/mimeinfo.cache /usr/share/applications/mimeinfo.cache ^/dev/null | string match -v '[MIME Cache]' | string replace = \t end