Tweaks for ls ad Valgrind completions

darcs-hash:20051015170914-ac50b-5066e3e3a5f4ef4a74e06d8f1cb9078c9d657dc7.gz
This commit is contained in:
axel 2005-10-16 03:09:14 +10:00
parent 1de5ba07af
commit c3c6ea0cb1
3 changed files with 97 additions and 91 deletions

View file

@ -1,44 +1,47 @@
complete -c ls -s a -l all -d "Show hidden"
complete -c ls -s A -l almost-all -d "Show hidden except . and .."
complete -c ls -l author -d "Print author"
complete -c ls -s b -l escape -d "Octal escapes for non graphic"
complete -c ls -l blocksize -x -d "Use SIZE-byte blocks"
complete -c ls -s B -l ignore-backups -d "Ignore files ending with ~"
complete -c ls -s c -d "Show and sort by ctime"
complete -c ls -s C -d "List by columns"
complete -c ls -l color -f -a "never always auto" -d "Show colors"
complete -c ls -s d -l directory -d "List directories"
complete -c ls -s D -l dired -d "Generate dired output"
complete -c ls -s f -d "Do not sort"
complete -c ls -s F -l classify -d "Append filetype indicator"
complete -c ls -l format -x -a "across commas horizontal long single-column verbose vertical" -d "List format"
complete -c ls -l full-time -d "Long forma, full-iso time"
complete -c ls -s g -d "Long format without owner"
complete -c ls -s G -l no-group -d "Do not print group information"
complete -c ls -s h -l human-readable -d "Human readable size"
complete -c ls -l si -d "Human readable size, base 1000"
complete -c ls -s H -l dereference-command-line -d "Follow symlinks"
complete -c ls -l dereference-command-line-symlink-to-dir #-d "Follow directory symlinks from command line"
complete -c ls -l indicator-style -x -a "none classify file-type" -d "Append indicator to entry"
complete -c ls -s i -l inode -d "Print index number of files"
complete -c ls -s I -l ignore -r -d "Skip entries matching pattern"
complete -c ls -s k -d "like --block-size=1K"
complete -c ls -s l -d "Long format"
complete -c ls -s L -l dereference -d "Follow symlinks"
complete -c ls -s m -d "Comma separated format"
complete -c ls -s n -l numeric-uid-gid -d "Long format, numeric IDs"
complete -c ls -s N -l literal -d "Print raw entry names"
complete -c ls -s o -d "Long format without groups"
complete -c ls -s p -l file-type -d "Append indicator"
complete -c ls -s q -l hide-control-chars -d "? fo non graphic"
complete -c ls -l show-control-chars -d "Non graphic as-is"
complete -c ls -s Q -l quote-name -d "Enclose entry in quotes"
complete -c ls -l quoting-style -x -a "literal locale shell shell-always c escape" -d "Select quoting style"
complete -c ls -s r -l reverse -d "Reverse sort order"
complete -c ls -s R -l recursive -d "List subdirectory recursively"
complete -c ls -s s -l size -d "Print size of files"
complete -c ls -s S -d "Sort by size"
complete -c ls -l sort -x -d "Sort criteria" -a "
for i in ls ll la
complete -c $i -s a -l all -d "Show hidden"
complete -c $i -s A -l almost-all -d "Show hidden except . and .."
complete -c $i -l author -d "Print author"
complete -c $i -s b -l escape -d "Octal escapes for non graphic"
complete -c $i -l blocksize -x -d "Use SIZE-byte blocks"
complete -c $i -s B -l ignore-backups -d "Ignore files ending with ~"
complete -c $i -s c -d "Show and sort by ctime"
complete -c $i -s C -d "List by columns"
complete -c $i -l color -f -a "never always auto" -d "Show colors"
complete -c $i -s d -l directory -d "List directories"
complete -c $i -s D -l dired -d "Generate dired output"
complete -c $i -s f -d "Do not sort"
complete -c $i -s F -l classify -d "Append filetype indicator"
complete -c $i -l format -x -a "across commas horizontal long single-column verbose vertical" -d "List format"
complete -c $i -l full-time -d "Long forma, full-iso time"
complete -c $i -s g -d "Long format without owner"
complete -c $i -s G -l no-group -d "Do not print group information"
complete -c $i -s h -l human-readable -d "Human readable size"
complete -c $i -l si -d "Human readable size, base 1000"
complete -c $i -s H -l dereference-command-line -d "Follow symlinks"
complete -c $i -l dereference-command-line-symlink-to-dir #-d "Follow directory symlinks from command line"
complete -c $i -l indicator-style -x -a "none classify file-type" -d "Append indicator to entry"
complete -c $i -s i -l inode -d "Print index number of files"
complete -c $i -s I -l ignore -r -d "Skip entries matching pattern"
complete -c $i -s k -d "like --block-size=1K"
complete -c $i -s l -d "Long format"
complete -c $i -s L -l dereference -d "Follow symlinks"
complete -c $i -s m -d "Comma separated format"
complete -c $i -s n -l numeric-uid-gid -d "Long format, numeric IDs"
complete -c $i -s N -l literal -d "Print raw entry names"
complete -c $i -s o -d "Long format without groups"
complete -c $i -s p -l file-type -d "Append indicator"
complete -c $i -s q -l hide-control-chars -d "? fo non graphic"
complete -c $i -l show-control-chars -d "Non graphic as-is"
complete -c $i -s Q -l quote-name -d "Enclose entry in quotes"
complete -c $i -l quoting-style -x -a "literal locale shell shell-always c escape" -d "Select quoting style"
complete -c $i -s r -l reverse -d "Reverse sort order"
complete -c $i -s R -l recursive -d "List subdirectory recursively"
complete -c $i -s s -l size -d "Print size of files"
complete -c $i -s S -d "Sort by size"
complete -c $i -l sort -x -d "Sort criteria" -a "
extension\t'Sort by file extension'
none\t'Do not sort'
size\t'Sort by size'
@ -49,23 +52,24 @@ complete -c ls -l sort -x -d "Sort criteria" -a "
access\t'Sort by access time'
use\t'Sort by access time'
"
complete -c ls -l time -x -d "Show time type" -a "
complete -c $i -l time -x -d "Show time type" -a "
time\t'Sort by modification time'
access\t'Sort by access time'
use\t'Sort by use time'
ctime\t'Sort by file status modification time'
status\t'Sort by status time'
"
complete -c ls -l time-style -x -a "full-iso long-iso iso locale" -d "Select time style"
complete -c ls -s t -d "Sort by modification time"
complete -c ls -s T -l tabsize -x -a "1 2 3 4 5 6 7 8 9 10 11 12" -d "Assume tab stops at each COLS"
complete -c ls -s u -d "Show access time"
complete -c ls -s U -d "Do not sort"
complete -c ls -s v -d "Sort by version"
complete -c ls -s w -l width -x -d "Assume screen width"
complete -c ls -s x -d "List entries by lines"
complete -c ls -s X -d "sort by extension"
complete -c ls -s 1 -d "List one file per line"
complete -c ls -l help -d "Display help and exit"
complete -c ls -l version -d "Output version and exit"
complete -c $i -l time-style -x -a "full-iso long-iso iso locale" -d "Select time style"
complete -c $i -s t -d "Sort by modification time"
complete -c $i -s T -l tabsize -x -a "1 2 3 4 5 6 7 8 9 10 11 12" -d "Assume tab stops at each COLS"
complete -c $i -s u -d "Show access time"
complete -c $i -s U -d "Do not sort"
complete -c $i -s v -d "Sort by version"
complete -c $i -s w -l width -x -d "Assume screen width"
complete -c $i -s x -d "List entries by lines"
complete -c $i -s X -d "sort by extension"
complete -c $i -s 1 -d "List one file per line"
complete -c $i -l help -d "Display help and exit"
complete -c $i -l version -d "Output version and exit"
end

View file

@ -3,7 +3,7 @@
#
#
# Depends on muont for $__fish_filesystems
# Depends on mount for $__fish_filesystems
#
complete -y mount

View file

@ -16,6 +16,9 @@ complete -xc valgrind -l $skin -d "Skin" -a "
helgrind\tData-race\ detector
massif\tHeap\ profiler
"
eval function __fish_valgrind_skin\; contains -- --$skin=\$argv \(commandline -cpo\)\;end
set -e $skin
complete -c valgrind -l help -d "Display help and exit"
@ -40,33 +43,32 @@ complete -xc valgrind -l input-fd -d "File descriptor for input" -a "0 1 2 3 4 5
# Memcheck-specific options
complete -n "contains -- --skin=memcheck (commandline -cpo)" -xc valgrind -l leak-check -d "Check for memory leaks" -a "no\t'Do not check for memory leaks' summary\t'Show a leak summary' full\t'Describe memory leaks in detail'"
complete -n "contains -- --skin=memcheck (commandline -cpo)" -xc valgrind -l show-reachable -d "Show reachable leaked memory" -a "yes\t'Show reachable leaked memory' no\t'Do not show reachable leaked memory'"
complete -n "contains -- --skin=memcheck (commandline -cpo)" -xc valgrind -l leak-resolution -d "Determines how willing Memcheck is to consider different backtraces to be the same" -a "low\t'Two entries need to match' med\t'Four entries need to match' high\t'All entries need to match'"
complete -n "contains -- --skin=memcheck (commandline -cpo)" -xc valgrind -l freelist-vol -d "Set size of freed memory pool"
complete -n "contains -- --skin=memcheck (commandline -cpo)" -xc valgrind -l partial-loads-ok -d 'How to handle loads of words that are partially addressible' -a 'yes\t"Do not emit errors on partial loads" no\t"Emit errors on partial loads"'
complete -n "contains -- --skin=memcheck (commandline -cpo)" -xc valgrind -l avoid-strlen-errors -d 'Whether to skip error reporting for the strlen function' -a 'yes no'
complete -n "__fish_valgrind_skin memcheck" -xc valgrind -l leak-check -d "Check for memory leaks" -a "no\t'Do not check for memory leaks' summary\t'Show a leak summary' full\t'Describe memory leaks in detail'"
complete -n "__fish_valgrind_skin memcheck" -xc valgrind -l show-reachable -d "Show reachable leaked memory" -a "yes\t'Show reachable leaked memory' no\t'Do not show reachable leaked memory'"
complete -n "__fish_valgrind_skin memcheck" -xc valgrind -l leak-resolution -d "Determines how willing Memcheck is to consider different backtraces to be the same" -a "low\t'Two entries need to match' med\t'Four entries need to match' high\t'All entries need to match'"
complete -n "__fish_valgrind_skin memcheck" -xc valgrind -l freelist-vol -d "Set size of freed memory pool"
complete -n "__fish_valgrind_skin memcheck" -xc valgrind -l partial-loads-ok -d 'How to handle loads of words that are partially addressible' -a 'yes\t"Do not emit errors on partial loads" no\t"Emit errors on partial loads"'
complete -n "__fish_valgrind_skin memcheck" -xc valgrind -l avoid-strlen-errors -d 'Whether to skip error reporting for the strlen function' -a 'yes no'
# Addrcheck-specific options
complete -n "contains -- --skin=addrcheck (commandline -cpo)" -xc valgrind -l leak-check -d "Check for memory leaks" -a "no\t'Do not check for memory leaks' summary\t'Show a leak summary' full\t'Describe memory leaks in detail'"
complete -n "contains -- --skin=addrcheck (commandline -cpo)" -xc valgrind -l show-reachable -d "Show reachable leaked memory" -a "yes\t'Show reachable leaked memory' no\t'Do not show reachable leaked memory'"
complete -n "contains -- --skin=addrcheck (commandline -cpo)" -xc valgrind -l leak-resolution -d "Determines how willing Addrcheck is to consider different backtraces to be the same" -a "low\t'Two entries need to match' med\t'Four entries need to match' high\t'All entries need to match'"
complete -n "contains -- --skin=addrcheck (commandline -cpo)" -xc valgrind -l freelist-vol -d "Set size of freed memory pool"
complete -n "contains -- --skin=addrcheck (commandline -cpo)" -xc valgrind -l partial-loads-ok -d 'How to handle loads of words that are partially addressible' -a 'yes\t"Do not emit errors on partial loads" no\t"Emit errors on partial loads"'
complete -n "contains -- --skin=addrcheck (commandline -cpo)" -xc valgrind -l avoid-strlen-errors -d 'Whether to skip error reporting for the strlen function' -a 'yes no'
complete -n "__fish_valgrind_skin addrcheck" -xc valgrind -l leak-check -d "Check for memory leaks" -a "no\t'Do not check for memory leaks' summary\t'Show a leak summary' full\t'Describe memory leaks in detail'"
complete -n "__fish_valgrind_skin addrcheck" -xc valgrind -l show-reachable -d "Show reachable leaked memory" -a "yes\t'Show reachable leaked memory' no\t'Do not show reachable leaked memory'"
complete -n "__fish_valgrind_skin addrcheck" -xc valgrind -l leak-resolution -d "Determines how willing Addrcheck is to consider different backtraces to be the same" -a "low\t'Two entries need to match' med\t'Four entries need to match' high\t'All entries need to match'"
complete -n "__fish_valgrind_skin addrcheck" -xc valgrind -l freelist-vol -d "Set size of freed memory pool"
complete -n "__fish_valgrind_skin addrcheck" -xc valgrind -l partial-loads-ok -d 'How to handle loads of words that are partially addressible' -a 'yes\t"Do not emit errors on partial loads" no\t"Emit errors on partial loads"'
complete -n "__fish_valgrind_skin addrcheck" -xc valgrind -l avoid-strlen-errors -d 'Whether to skip error reporting for the strlen function' -a 'yes no'
# Cachegrind-specific options
complete -n "contains -- --skin=cachegrind (commandline -cpo)" -xc valgrind -l I1 -d "Type of L1 instruction cache"
complete -n "contains -- --skin=cachegrind (commandline -cpo)" -xc valgrind -l D1 -d "Type of L1 data cache"
complete -n "contains -- --skin=cachegrind (commandline -cpo)" -xc valgrind -l L2 -d "Type of L2 cache"
complete -n "__fish_valgrind_skin cachegrind" -xc valgrind -l I1 -d "Type of L1 instruction cache"
complete -n "__fish_valgrind_skin cachegrind" -xc valgrind -l D1 -d "Type of L1 data cache"
complete -n "__fish_valgrind_skin cachegrind" -xc valgrind -l L2 -d "Type of L2 cache"
# Massif-specific options
complete -c valgrind -n "contains -- --skin=massif (commandline -cpo)" -l alloc-fn -d "Specify a function that allocates memory"
complete -c valgrind -n "contains -- --skin=massif (commandline -cpo)" -x -l heap -d 'Profile heap usage' -a 'yes\t"Profile heap usage" no\t"Do not profile heap usage"'
complete -c valgrind -n "contains -- --skin=massif (commandline -cpo)" -x -l heap-admin -d "The number of bytes of heap overhead per allocation"
complete -c valgrind -n "contains -- --skin=massif (commandline -cpo)" -x -l stacks -d "Profile stack usage" -a 'yes\t"Profile stack usage" no\t"Do not profile stack usage"'
complete -c valgrind -n "contains -- --skin=massif (commandline -cpo)" -x -l depth -d "Depth of call chain"
complete -c valgrind -n "contains -- --skin=massif (commandline -cpo)" -x -l format -d "Profiling output format" -a "html\t'Produce html output' text\t'Produce text output'"
complete -c valgrind -n "__fish_valgrind_skin massif" -l alloc-fn -d "Specify a function that allocates memory" -x
complete -c valgrind -n "__fish_valgrind_skin massif" -x -l heap -d 'Profile heap usage' -a 'yes\t"Profile heap usage" no\t"Do not profile heap usage"'
complete -c valgrind -n "__fish_valgrind_skin massif" -x -l heap-admin -d "The number of bytes of heap overhead per allocation"
complete -c valgrind -n "__fish_valgrind_skin massif" -x -l stacks -d "Profile stack usage" -a 'yes\t"Profile stack usage" no\t"Do not profile stack usage"'
complete -c valgrind -n "__fish_valgrind_skin massif" -x -l depth -d "Depth of call chain"
complete -c valgrind -n "__fish_valgrind_skin massif" -x -l format -d "Profiling output format" -a "html\t'Produce html output' text\t'Produce text output'"