From 9dcb5abaf1d60753e134954db4be9a7f200f0642 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Thu, 14 Mar 2019 17:15:09 +0100 Subject: [PATCH] completions/pandoc: Stringify This should be the last call to `grep` outside of a script specifically related to `grep`. (With the exception of `zpool`, which I've already written, but which will probably be merged later) --- share/completions/pandoc.fish | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/completions/pandoc.fish b/share/completions/pandoc.fish index 1d45753f2..cb2927276 100644 --- a/share/completions/pandoc.fish +++ b/share/completions/pandoc.fish @@ -98,9 +98,9 @@ complete -c pandoc -r -f -l bibliography -a "(__fish_complete_suffix 'ria')" complete -c pandoc -r -f -l lua-filter -a "(__fish_complete_suffix 'lua')" # options that take files in DATADIR -complete -c pandoc -r -s F -l filter -a "(find $datadir/filters/** | sed -e 's|$datadir/filters/||')" -complete -c pandoc -r -l template -a "(find $datadir/templates/** | sed -e 's|$datadir/templates/||')" -complete -c pandoc -r -f -l lua-filter -a "(find $datadir/** | egrep '.lua\$' | sed -e 's|$datadir/||')" +complete -c pandoc -r -s F -l filter -a "(find $datadir/filters/** | string replace -- '$datadir/filters/' '')" +complete -c pandoc -r -l template -a "(find $datadir/templates/** | string replace -- '$datadir/templates/' '')" +complete -c pandoc -r -f -l lua-filter -a "(find $datadir/** | string match -r '.lua\$' | string replace -- '$datadir/' '')" # options that require arguments which cannot be autocompleted complete -c pandoc -x -l indented-code-classes