fix compatibility with BSD sed

Closes #6087.
This commit is contained in:
LawAbidingCactus 2019-09-03 00:51:02 +00:00 committed by David Adam
parent f7dac82ed6
commit c20a9ea477

View file

@ -59,7 +59,15 @@ function __fish_print_gpg_algo -d "Complete using all algorithms of the type spe
# 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; y!\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