From 427ddbf9312af42ca0f01cd9d5cd42c74b18a9a3 Mon Sep 17 00:00:00 2001 From: James Doyle Date: Tue, 27 Aug 2019 10:40:23 -0700 Subject: [PATCH] Use `string replace` instead of `sed` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It seems like this was broken on my machine (OSX, 10.14.6) when using the completions. It would strip the `, ` but it would not add a proper newline. Instead it added nothing. So it just become a giant single line. Basically, it didn’t work. With this change, the string gets split properly. Since this is fish shell, the `string replace` command is guaranteed to be there. --- fish_tealdeer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fish_tealdeer b/fish_tealdeer index 8a71d003..b9db05bd 100644 --- a/fish_tealdeer +++ b/fish_tealdeer @@ -15,7 +15,7 @@ complete -c tldr -l config-path -d 'Show config file path.' -f complete -c tldr -l seed-config -d 'Create a basic config.' -f function __tealdeer_entries - tldr --list | sed -e 's/, /\n/g' + tldr --list | string replace -a -i -r "\,\s" "\n" end complete -f -c tldr -a '(__tealdeer_entries)'