From 2719179bc13a09103aa6eab2454406add6122dc0 Mon Sep 17 00:00:00 2001 From: Birk Tjelmeland Date: Sat, 27 Feb 2021 01:26:20 +0000 Subject: [PATCH] Fix pandoc completion error Pandoc completions would give an error if the folder `~/.pandoc` does exist. This commit fixes that. --- 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 40d926af5..17121839d 100644 --- a/share/completions/pandoc.fish +++ b/share/completions/pandoc.fish @@ -98,9 +98,9 @@ complete -c pandoc -r -f -l bibliography -k -a "(__fish_complete_suffix 'ria')" complete -c pandoc -r -f -l lua-filter -k -a "(__fish_complete_suffix 'lua')" # options that take files in 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/' '')" +complete -c pandoc -r -s F -l filter -a "(find $datadir/filters -type f 2>/dev/null | string replace -- '$datadir/filters/' '')" +complete -c pandoc -r -l template -a "(find $datadir/templates -type f 2>/dev/null | string replace -- '$datadir/templates/' '')" +complete -c pandoc -r -f -l lua-filter -a "(find $datadir -type f 2>/dev/null | string match -r '.lua\$' | string replace -- '$datadir/' '')" # options that require arguments which cannot be autocompleted complete -c pandoc -x -l indented-code-classes