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)
This commit is contained in:
Fabian Homborg 2019-03-14 17:15:09 +01:00
parent 605b1cfab6
commit 9dcb5abaf1

View file

@ -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')" complete -c pandoc -r -f -l lua-filter -a "(__fish_complete_suffix 'lua')"
# options that take files in DATADIR # 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 -s F -l filter -a "(find $datadir/filters/** | string replace -- '$datadir/filters/' '')"
complete -c pandoc -r -l template -a "(find $datadir/templates/** | sed -e 's|$datadir/templates/||')" 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/** | egrep '.lua\$' | sed -e 's|$datadir/||')" 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 # options that require arguments which cannot be autocompleted
complete -c pandoc -x -l indented-code-classes complete -c pandoc -x -l indented-code-classes