From 7add4d57823b98ede9aff7ea512f1d119735c0e4 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Mon, 20 Jul 2015 12:34:18 +0200 Subject: [PATCH] Normalize *tex completions --- share/completions/elatex.fish | 2 +- share/completions/etex.fish | 2 +- share/completions/latex.fish | 2 +- share/completions/lualatex.fish | 2 +- share/completions/omega.fish | 2 +- share/completions/pdfelatex.fish | 2 +- share/completions/pdfetex.fish | 2 +- share/completions/pdflatex.fish | 2 +- share/completions/pdftex.fish | 2 +- share/completions/tex.fish | 20 ++++++++++++++++---- share/completions/xelatex.fish | 2 +- share/functions/__fish_complete_tex.fish | 21 --------------------- 12 files changed, 26 insertions(+), 35 deletions(-) delete mode 100644 share/functions/__fish_complete_tex.fish diff --git a/share/completions/elatex.fish b/share/completions/elatex.fish index 68294ba4d..5d0b5a71c 100644 --- a/share/completions/elatex.fish +++ b/share/completions/elatex.fish @@ -1,2 +1,2 @@ -__fish_complete_tex elatex +complete -c tex -w elatex diff --git a/share/completions/etex.fish b/share/completions/etex.fish index b0280a375..6b05c91fb 100644 --- a/share/completions/etex.fish +++ b/share/completions/etex.fish @@ -1 +1 @@ -__fish_complete_tex etex +complete -c tex -w etex diff --git a/share/completions/latex.fish b/share/completions/latex.fish index 1897f9653..635b6dc4d 100644 --- a/share/completions/latex.fish +++ b/share/completions/latex.fish @@ -1,2 +1,2 @@ -__fish_complete_tex latex +complete -c tex -w latex diff --git a/share/completions/lualatex.fish b/share/completions/lualatex.fish index 2aa472eff..168ee6a41 100644 --- a/share/completions/lualatex.fish +++ b/share/completions/lualatex.fish @@ -1,2 +1,2 @@ -__fish_complete_tex lualatex +complete -c tex -w lualatex diff --git a/share/completions/omega.fish b/share/completions/omega.fish index 76908cc8a..661cae5ea 100644 --- a/share/completions/omega.fish +++ b/share/completions/omega.fish @@ -1,2 +1,2 @@ -__fish_complete_tex omega +complete -c tex -w omega diff --git a/share/completions/pdfelatex.fish b/share/completions/pdfelatex.fish index 555d9b7d1..3f2f7a3b8 100644 --- a/share/completions/pdfelatex.fish +++ b/share/completions/pdfelatex.fish @@ -1,3 +1,3 @@ -__fish_complete_tex pdfelatex +complete -c tex -w pdfelatex diff --git a/share/completions/pdfetex.fish b/share/completions/pdfetex.fish index a5ae9f9a2..162cd76b2 100644 --- a/share/completions/pdfetex.fish +++ b/share/completions/pdfetex.fish @@ -1,3 +1,3 @@ -__fish_complete_tex pdfetex +complete -c tex -w pdfetex diff --git a/share/completions/pdflatex.fish b/share/completions/pdflatex.fish index 80b1a5bf2..e0c52630a 100644 --- a/share/completions/pdflatex.fish +++ b/share/completions/pdflatex.fish @@ -1,2 +1,2 @@ -__fish_complete_tex pdflatex +complete -c tex -w pdflatex diff --git a/share/completions/pdftex.fish b/share/completions/pdftex.fish index c4c6f2702..dbe486207 100644 --- a/share/completions/pdftex.fish +++ b/share/completions/pdftex.fish @@ -1,3 +1,3 @@ -__fish_complete_tex pdftex +complete -c tex -w pdftex diff --git a/share/completions/tex.fish b/share/completions/tex.fish index e62d33a46..308a950ca 100644 --- a/share/completions/tex.fish +++ b/share/completions/tex.fish @@ -1,5 +1,17 @@ +complete -c tex -o help --description "Display help and exit" +complete -c tex -o version --description "Display version and exit" +complete -c tex -x -a "( +__fish_complete_suffix (commandline -ct) .tex '(La)TeX file' +)" -set -l cmds -c etex -c tex -c elatex -c latex -c pdflatex -c pdfelatex -c pdftex -c pdfetex -c omega - -__fish_complete_tex tex - +complete -c tex -o file-line-error -d "Show errors in style file:line" +complete -c tex -o no-file-line-error -d "Show errors not in style file:line" +complete -c tex -o halt-on-error -d "Stop processing at the first error" +complete -c tex -o interaction=batchmode -d "Set interaction mode" +complete -c tex -o interaction=nonstopmode -d "Set interaction mode" +complete -c tex -o interaction=scrollmode -d "Set interaction mode" +complete -c tex -o interaction=errorstopmode -d "Set interaction mode" +complete -c tex -o output-directory= -x -a "(__fish_complete_directories (commandline -ct))" -d "Output directory" +complete -c tex -o shell-escape -d "Enable \write18{SHELL COMMAND}" +complete -c tex -o no-shell-escape -d "Disable \write18{SHELL COMMAND}" +complete -c tex -o src-specials -d "Insert source specials into the DVI file" diff --git a/share/completions/xelatex.fish b/share/completions/xelatex.fish index 400c36b72..4d44c97ae 100644 --- a/share/completions/xelatex.fish +++ b/share/completions/xelatex.fish @@ -1,2 +1,2 @@ -__fish_complete_tex xelatex +complete -c tex -w xelatex diff --git a/share/functions/__fish_complete_tex.fish b/share/functions/__fish_complete_tex.fish deleted file mode 100644 index 152658b6c..000000000 --- a/share/functions/__fish_complete_tex.fish +++ /dev/null @@ -1,21 +0,0 @@ - -function __fish_complete_tex -d "Common completions for all tex commands" - - complete -c $argv -o help --description "Display help and exit" - complete -c $argv -o version --description "Display version and exit" - complete -c $argv -x -a "( - __fish_complete_suffix (commandline -ct) .tex '(La)TeX file' - )" - - complete -c $argv -o file-line-error -d "Show errors in style file:line" - complete -c $argv -o no-file-line-error -d "Show errors not in style file:line" - complete -c $argv -o halt-on-error -d "Stop processing at the first error" - complete -c $argv -o interaction=batchmode -d "Set interaction mode" - complete -c $argv -o interaction=nonstopmode -d "Set interaction mode" - complete -c $argv -o interaction=scrollmode -d "Set interaction mode" - complete -c $argv -o interaction=errorstopmode -d "Set interaction mode" - complete -c $argv -o output-directory= -x -a "(__fish_complete_directories (commandline -ct))" -d "Output directory" - complete -c $argv -o shell-escape -d "Enable \write18{SHELL COMMAND}" - complete -c $argv -o no-shell-escape -d "Disable \write18{SHELL COMMAND}" - complete -c $argv -o src-specials -d "Insert source specials into the DVI file" -end