Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* __fish_complete_subcommand_root now passes arguments to
__fish_complete_subcommand * sudo: - now can be completed bu group and user (-u and -g keys). - subcommand completion is fixed * __fish_complete_proc.fish is added to complete killall command with list of running processes * __fish_complete_tex.fish is updated with common options * __fish_make_completion_signals.fish is added to make a list of kill signals for kill and killall * completions: - minor filetype completions are added for djview, xpdf, mupdf, gv, xdvi - adduser is copmleted by user and group - dlocate and dpkg are completed by packages - find: -executable options is added - htop: options - funced and funcsave are completed by function names - ifdown and ifup are copmleted by interfaces - kill and killall: options, signals and processes - latexmk, ln, nm: options - lualatex and xelatex copmletions - sudo: -u and -g options - wvdial: presets
- Loading branch information
gonchar
committed
Sep 23, 2011
1 parent
c25c48f
commit c66ec4d
Showing
30 changed files
with
175 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
complete -c djview -x -a "(__fish_complete_suffix .djvu)" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
complete -c djview3 -x -a "(__fish_complete_suffix .djvu)" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
complete -c djview4 -x -a "(__fish_complete_suffix .djvu)" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
complete -c dlocate -s S -x -d 'List records that match filenames' | ||
complete -c dlocate -s L -d 'List all files in the package' -xa '(__fish_print_packages)' | ||
complete -c dlocate -o ls -d 'ls -ldF all files in the package' -xa '(__fish_print_packages)' | ||
complete -c dlocate -o du -d 'du -sck all files in the package' -xa '(__fish_print_packages)' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
complete -c dpkg -s i -l install -d 'Install .deb package' -xa '(__fish_complete_suffix .deb)' | ||
complete -c dpkg -s r -l remove -d 'Remove package' -xa '(__fish_print_packages)' | ||
complete -c dpkg -s P -l purge -d 'Purge package' -xa '(__fish_print_packages)' | ||
complete -c dpkg -l force-all -d 'Continue on all problems' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
complete -c funced -xa "(functions -na)" --description "Save function" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
complete -c funcsave -xa "(functions -na)" --description "Save function" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
complete -c gv -x -a "(__fish_complete_suffix .ps)" | ||
complete -c gv -x -a "(__fish_complete_suffix .ps.gz)" | ||
complete -c gv -x -a "(__fish_complete_suffix .eps)" | ||
complete -c gv -x -a "(__fish_complete_suffix .pdf)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Completions for top | ||
complete -c htop -s d --description "Update interval" -x | ||
complete -c htop -s u --description "Monitor effective UID" -x -a "(__fish_complete_users)" | ||
complete -c htop -l sort-key -d 'Sort column' -xa "(htop --sort-key '')" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
complete -x -c ifdown -a "(__fish_print_interfaces)" --description "Network interface" | ||
complete -c ifdown -l force --description "force" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
complete -x -c ifup -a "(__fish_print_interfaces)" --description "Network interface" | ||
complete -c ifup -l force --description "force" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,13 @@ | ||
# Completions for the kill command | ||
__fish_make_completion_signals | ||
|
||
set -l signals | ||
|
||
if kill -L ^/dev/null >/dev/null | ||
|
||
# Debian and some related systems use 'kill -L' to write out a numbered list | ||
# of signals. Use this to complete on both number _and_ on signal name. | ||
|
||
complete -c kill -s L --description "List codes and names of available signals" | ||
|
||
set signals (kill -L | sed -e 's/\([0-9][0-9]*\) *\([A-Z,0-9][A-Z,0-9]*\)/\1 \2\n/g;s/ +/ /g' | sed -e 's/^ //' | sgrep -E '^[^ ]+') | ||
|
||
else | ||
|
||
# Posix systems print out the name of a signal using 'kill -l | ||
# SIGNUM', so we use this instead. | ||
|
||
complete -c kill -s l --description "List names of available signals" | ||
|
||
for i in (seq 31) | ||
set signals $signals $i" "(kill -l $i) | ||
end | ||
|
||
end | ||
|
||
for i in $signals | ||
for i in $__kill_signals | ||
set number (echo $i | cut -d " " -f 1) | ||
set name (echo $i | cut -d " " -f 2) | ||
complete -c kill -o $number -d $name | ||
complete -c kill -o $name -d $name | ||
complete -c kill -o s -x -a \"$number\tSend\ $name\ signal\" | ||
complete -c kill -o s -x -a \"$name\tSend\ $name\ signal\" | ||
complete -c kill -o s -x -a \"$name\tSend\ $name\ signal\" | ||
end | ||
complete -c kill -xa '(__fish_complete_pids)' | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
__fish_make_completion_signals | ||
|
||
for i in $__kill_signals | ||
set number (echo $i | cut -d " " -f 1) | ||
set name (echo $i | cut -d " " -f 2) | ||
complete -c killall -o $number -d $name | ||
complete -c killall -o $name -d $name | ||
complete -c killall -o s -x -a \"$number\tSend\ $name\ signal\" | ||
complete -c killall -o s -x -a \"$name\tSend\ $name\ signal\" | ||
end | ||
complete -c killall -xa '(__fish_complete_proc)' | ||
complete -c killall -s e -l exact -d 'Require an exact match for very long names' | ||
complete -c killall -s I -l ignore-case -d 'Do case insensitive process name match' | ||
complete -c killall -s g -l process-group -d 'Kill the process group to which the process belongs. The kill signal is only sent once per group, even if multiple processes belonging to the same process group were found' | ||
complete -c killall -s i -l interactive -d 'Interactively ask for confirmation before killing' | ||
complete -c killall -s u -l user -d 'Kill only processes the specified user owns. Command names are optional' | ||
complete -c killall -s w -l wait -d 'Wait for all killed processes to die. killall checks once per second if any of the killed processes still exist and only returns if none are left. Note that killall may wait forever if the signal was ignored, had no effect, or if the process stays in zombie state' | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
complete -c latexmk -x -a "(__fish_complete_suffix (commandline -ct) .tex '(La)TeX file')" | ||
complete -c latexmk -o dvi -d "Make dvi" | ||
complete -c latexmk -o ps -d "Make ps dvi->ps" | ||
complete -c latexmk -o pdf -d "Make pdf" | ||
complete -c latexmk -o pdfps -d "Make pdf dvi->ps->pdf" | ||
complete -c latexmk -o pdfdvi -d "Make pdf dvi->pdf" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# completions for ln | ||
# Author: SanskritFritz (gmail) | ||
|
||
complete -c ln -f -s s -l symbolic -d 'make symbolic links instead of hard links' | ||
complete -c ln -f -l backup=CONTROL -d 'make a backup of each existing destination file' | ||
complete -c ln -f -s b -d 'like --backup but does not accept an argument' | ||
complete -c ln -f -s d -l directory -d 'allow the superuser to attempt to hard link directories' | ||
complete -c ln -f -s f -l force -d 'remove existing destination files' | ||
complete -c ln -f -s i -l interactive -d 'prompt whether to remove destinations' | ||
complete -c ln -f -s L -l logical -d 'make hard links to symbolic link references' | ||
complete -c ln -f -s n -l no-dereference -d 'treat destination that is a symlink to a directory as if it were a normal file' | ||
complete -c ln -f -s P -l physical -d 'make hard links directly to symbolic links' | ||
complete -c ln -f -s S -l suffix=SUFFIX -d 'override the usual backup suffix' | ||
complete -c ln -f -s t -l target-directory=DIRECTORY -d 'specify the DIRECTORY in which to create the links' | ||
complete -c ln -f -s T -l no-target-directory -d 'treat LINK_NAME as a normal file' | ||
complete -c ln -f -s v -l verbose -d 'print name of each linked file' | ||
complete -c ln -f -l help -d 'display this help and exit' | ||
complete -c ln -f -l version -d 'output version information and exit' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
__fish_complete_tex lualatex | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
complete -c mupdf -x -a "(__fish_complete_suffix .pdf)" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
complete -c nm -s a -l debug-syms -d 'Display debugger-only symbols' | ||
complete -c nm -s A -l print-file-name -d 'Print name of the input file before every symbol' | ||
#complete -c nm -C -l demangle[=STYLE] Decode low-level symbol names into user-level names | ||
# Same as --format=bsd | ||
# The STYLE, if specified, can be `auto' (the default), | ||
# `gnu', `lucid', `arm', `hp', `edg', `gnu-v3', `java' or `gnat' | ||
complete -c nm -l no-demangle -d 'Do not demangle low-level symbol names' | ||
complete -c nm -s D -l dynamic -d 'Display dynamic symbols instead of normal symbols' | ||
complete -c nm -l defined-only -d 'Display only defined symbols' | ||
complete -c nm -s f -l format=FORMAT -d 'Use the output format FORMAT. FORMAT can be "bsd", "sysv" or "posix". The default is "bsd"' | ||
complete -c nm -s g -l extern-only -d 'Display only external symbols' | ||
complete -c nm -s l -l line-numbers -d 'Use debugging information to find a filename and line number for each symbol' | ||
complete -c nm -s n -l numeric-sort -d 'Sort symbols numerically by address' | ||
complete -c nm -s o -d 'Print name of the input file before every symbol' | ||
complete -c nm -s p -l no-sort -d 'Do not sort the symbols' | ||
complete -c nm -s P -l portability -d 'Same as --format=posix' | ||
complete -c nm -s r -l reverse-sort -d 'Reverse the sense of the sort' | ||
complete -c nm -l plugin -d 'Load the specified plugin' | ||
complete -c nm -s S -l print-size -d 'Print size of defined symbols' | ||
complete -c nm -s s -l print-armap -d 'Include index for symbols from archive members' | ||
complete -c nm -l size-sort -d 'Sort symbols by size' | ||
complete -c nm -l special-syms -d 'Include special symbols in the output' | ||
complete -c nm -l synthetic -d 'Display synthetic symbols as well' | ||
complete -c nm -s t -l radix=RADIX -d 'Use RADIX for printing symbol values' | ||
complete -c nm -l target=BFDNAME -d 'Specify the target object format as BFDNAME' | ||
complete -c nm -s u -l undefined-only -d 'Display only undefined symbols' | ||
complete -c nm -s h -l help -d 'Display this information' | ||
complete -c nm -s V -l version -d "Display this program's version number" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
complete -x -c wvdial -a "(print_wvdial)" --description "wvdial connections" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
complete -c xdvi -x -a "(__fish_complete_suffix .dvi)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
__fish_complete_tex xelatex | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
function __fish_complete_proc --description 'Complete by list of running processes' | ||
ps a --no-headers --format comm | uniq | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
function __fish_make_completion_signals --description 'Make list of kill signals for copmletion' | ||
set -q __kill_signals; and return 0 | ||
|
||
if kill -L ^/dev/null >/dev/null | ||
# Debian and some related systems use 'kill -L' to write out a numbered list | ||
# of signals. Use this to complete on both number _and_ on signal name. | ||
complete -c kill -s L --description "List codes and names of available signals" | ||
set -g __kill_signals (kill -L | sed -e 's/\([0-9][0-9]*\) *\([A-Z,0-9][A-Z,0-9]*\)/\1 \2\n/g;s/ +/ /g' | sed -e 's/^ \+//' | sgrep -E '^[^ ]+') | ||
else | ||
# Posix systems print out the name of a signal using 'kill -l | ||
# SIGNUM', so we use this instead. | ||
complete -c kill -s l --description "List names of available signals" | ||
for i in (seq 31) | ||
set -g __kill_signals $signals $i" "(kill -l $i) | ||
end | ||
end | ||
end |