diff options
author | 2007-01-16 11:18:28 +1000 | |
---|---|---|
committer | 2007-01-16 11:18:28 +1000 | |
commit | 34e27ff4c216e2d379afba19fed2761a684697d8 (patch) | |
tree | a1429d6c9796caf54c3f4d440e740a88e3aa76aa /share/functions | |
parent | 47588c8e75f56f6065a4eb6d4e3bccbad4fab14e (diff) |
Drop use of the N_ no-op for translation descriptions. Instead, tell xgettext that any token following '--description' should be translated. This should greatly speed up completion loading on platforms where fork() is slow. (Hi, OS X)
darcs-hash:20070116011828-ac50b-fb923dc877869ded4d506bbe0bc5364eea44092f.gz
Diffstat (limited to 'share/functions')
-rw-r--r-- | share/functions/N_.fish | 2 | ||||
-rw-r--r-- | share/functions/__fish_complete_bittorrent.fish | 58 | ||||
-rw-r--r-- | share/functions/__fish_complete_ls.fish | 134 | ||||
-rw-r--r-- | share/functions/__fish_complete_ssh.fish | 20 | ||||
-rw-r--r-- | share/functions/__fish_complete_tex.fish | 4 |
5 files changed, 109 insertions, 109 deletions
diff --git a/share/functions/N_.fish b/share/functions/N_.fish index d4f24db2..74c39b4a 100644 --- a/share/functions/N_.fish +++ b/share/functions/N_.fish @@ -1,6 +1,6 @@ -function N_ -d "No-op" +function N_ --description "No-op" printf "%s" $argv end diff --git a/share/functions/__fish_complete_bittorrent.fish b/share/functions/__fish_complete_bittorrent.fish index b9581c55..d78d0c10 100644 --- a/share/functions/__fish_complete_bittorrent.fish +++ b/share/functions/__fish_complete_bittorrent.fish @@ -1,33 +1,33 @@ # Bittorrent commands function __fish_complete_bittorrent - complete -c $argv -l max_uploads -x -d (N_ "Maximum uploads at once") - complete -c $argv -l keepalive_interval -x -d (N_ "Number of seconds between keepalives") - complete -c $argv -l download_slice_size -x -d (N_ "Bytes per request") - complete -c $argv -l request_backlog -x -d (N_ "Requests per pipe") - complete -c $argv -l max_message_length -x -d (N_ "Maximum length prefix encoding") - complete -c $argv -l ip -d (N_ "IP to report to the tracker") -x -a "(__fish_print_addresses)" - complete -c $argv -l minport -d (N_ "Minimum port to listen to") - complete -c $argv -l maxport -d (N_ "Maximum port to listen to") - complete -c $argv -l responsefile -r -d (N_ "File for server response") - complete -c $argv -l url -x -d (N_ "URL to get file from") - complete -c $argv -l saveas -r -d (N_ "Local file target") - complete -c $argv -l timeout -x -d (N_ "Time to close inactive socket") - complete -c $argv -l timeout_check_interval -x -d (N_ "Time between checking timeouts") - complete -c $argv -l max_slice_length -x -d (N_ "Maximum outgoing slice length") - complete -c $argv -l max_rate_period -x -d (N_ "Maximum time to guess rate") - complete -c $argv -l bind -x -d (N_ "IP to bind to locally") -a "(__fish_print_addresses)" - complete -c $argv -l display_interval -x -d (N_ "Time between screen updates") - complete -c $argv -l rerequest_interval -x -d (N_ "Time to wait between requesting more peers") - complete -c $argv -l min_peers -x -d (N_ "Minimum number of peers to not do requesting") - complete -c $argv -l http_timeout -x -d (N_ "Number of seconds before assuming http timeout") - complete -c $argv -l max_initiate -x -d (N_ "Number of peers at which to stop initiating new connections") - complete -c $argv -l max_allow_in -x -d (N_ "Maximum number of connections to allow") - complete -c $argv -l check_hashes -x -d (N_ "Whether to check hashes on disk") - complete -c $argv -l max_upload_rate -x -d (N_ "Maximum kB/s to upload at") - complete -c $argv -l snub_time -x -d (N_ "Seconds to wait for data to come in before assuming choking") - complete -c $argv -l spew -x -d (N_ "Whether to display diagnostic info") - complete -c $argv -l rarest_first_cutoff -x -d (N_ "Number of downloads at which to switch from random to rarest first") - complete -c $argv -l min_uploads -x -d (N_ "Number of uploads to fill out to with optimistic unchokes") - complete -c $argv -l report_hash_failiures -x -d (N_ "Whether to inform the user that hash failures occur") + complete -c $argv -l max_uploads -x --description "Maximum uploads at once" + complete -c $argv -l keepalive_interval -x --description "Number of seconds between keepalives" + complete -c $argv -l download_slice_size -x --description "Bytes per request" + complete -c $argv -l request_backlog -x --description "Requests per pipe" + complete -c $argv -l max_message_length -x --description "Maximum length prefix encoding" + complete -c $argv -l ip --description "IP to report to the tracker" -x -a "(__fish_print_addresses)" + complete -c $argv -l minport --description "Minimum port to listen to" + complete -c $argv -l maxport --description "Maximum port to listen to" + complete -c $argv -l responsefile -r --description "File for server response" + complete -c $argv -l url -x --description "URL to get file from" + complete -c $argv -l saveas -r --description "Local file target" + complete -c $argv -l timeout -x --description "Time to close inactive socket" + complete -c $argv -l timeout_check_interval -x --description "Time between checking timeouts" + complete -c $argv -l max_slice_length -x --description "Maximum outgoing slice length" + complete -c $argv -l max_rate_period -x --description "Maximum time to guess rate" + complete -c $argv -l bind -x --description "IP to bind to locally" -a "(__fish_print_addresses)" + complete -c $argv -l display_interval -x --description "Time between screen updates" + complete -c $argv -l rerequest_interval -x --description "Time to wait between requesting more peers" + complete -c $argv -l min_peers -x --description "Minimum number of peers to not do requesting" + complete -c $argv -l http_timeout -x --description "Number of seconds before assuming http timeout" + complete -c $argv -l max_initiate -x --description "Number of peers at which to stop initiating new connections" + complete -c $argv -l max_allow_in -x --description "Maximum number of connections to allow" + complete -c $argv -l check_hashes -x --description "Whether to check hashes on disk" + complete -c $argv -l max_upload_rate -x --description "Maximum kB/s to upload at" + complete -c $argv -l snub_time -x --description "Seconds to wait for data to come in before assuming choking" + complete -c $argv -l spew -x --description "Whether to display diagnostic info" + complete -c $argv -l rarest_first_cutoff -x --description "Number of downloads at which to switch from random to rarest first" + complete -c $argv -l min_uploads -x --description "Number of uploads to fill out to with optimistic unchokes" + complete -c $argv -l report_hash_failiures -x --description "Whether to inform the user that hash failures occur" end diff --git a/share/functions/__fish_complete_ls.fish b/share/functions/__fish_complete_ls.fish index 2e83c86c..ff3bf4e0 100644 --- a/share/functions/__fish_complete_ls.fish +++ b/share/functions/__fish_complete_ls.fish @@ -13,62 +13,62 @@ function __fish_complete_ls -d "Compleletions for ls and its aliases" # Shared ls switches - __fish_gnu_complete $cmds -s a -l all -d (N_ "Show hidden") $is_gnu - __fish_gnu_complete $cmds -s A -l almost-all -d (N_ "Show hidden except . and ..") $is_gnu - __fish_gnu_complete $cmds -s F -l classify -d (N_ "Append filetype indicator") $is_gnu - __fish_gnu_complete $cmds -s H -l dereference-command-line -d (N_ "Follow symlinks") $is_gnu - __fish_gnu_complete $cmds -s L -l dereference -d (N_ "Follow symlinks") $is_gnu - __fish_gnu_complete $cmds -s R -l recursive -d (N_ "List subdirectory recursively") $is_gnu - __fish_gnu_complete $cmds -s b -l escape -d (N_ "Octal escapes for non graphic characters") $is_gnu - __fish_gnu_complete $cmds -s d -l directory -d (N_ "List directories, not their content") $is_gnu - __fish_gnu_complete $cmds -s h -l human-readable -d (N_ "Human readable sizes") $is_gnu - __fish_gnu_complete $cmds -s i -l inode -d (N_ "Print inode number of files") $is_gnu - __fish_gnu_complete $cmds -s n -l numeric-uid-gid -d (N_ "Long format, numeric IDs") $is_gnu - __fish_gnu_complete $cmds -s p -l file-type -d (N_ "Append filetype indicator") $is_gnu - __fish_gnu_complete $cmds -s q -l hide-control-chars -d (N_ "Replace non-graphic characters with '?'") $is_gnu - __fish_gnu_complete $cmds -s r -l reverse -d (N_ "Reverse sort order") $is_gnu - __fish_gnu_complete $cmds -s s -l size -d (N_ "Print size of files") $is_gnu + __fish_gnu_complete $cmds -s a -l all --description "Show hidden" $is_gnu + __fish_gnu_complete $cmds -s A -l almost-all --description "Show hidden except . and .." $is_gnu + __fish_gnu_complete $cmds -s F -l classify --description "Append filetype indicator" $is_gnu + __fish_gnu_complete $cmds -s H -l dereference-command-line --description "Follow symlinks" $is_gnu + __fish_gnu_complete $cmds -s L -l dereference --description "Follow symlinks" $is_gnu + __fish_gnu_complete $cmds -s R -l recursive --description "List subdirectory recursively" $is_gnu + __fish_gnu_complete $cmds -s b -l escape --description "Octal escapes for non graphic characters" $is_gnu + __fish_gnu_complete $cmds -s d -l directory --description "List directories, not their content" $is_gnu + __fish_gnu_complete $cmds -s h -l human-readable --description "Human readable sizes" $is_gnu + __fish_gnu_complete $cmds -s i -l inode --description "Print inode number of files" $is_gnu + __fish_gnu_complete $cmds -s n -l numeric-uid-gid --description "Long format, numeric IDs" $is_gnu + __fish_gnu_complete $cmds -s p -l file-type --description "Append filetype indicator" $is_gnu + __fish_gnu_complete $cmds -s q -l hide-control-chars --description "Replace non-graphic characters with '?'" $is_gnu + __fish_gnu_complete $cmds -s r -l reverse --description "Reverse sort order" $is_gnu + __fish_gnu_complete $cmds -s s -l size --description "Print size of files" $is_gnu - complete $cmds -s C -d (N_ "List by columns") - complete $cmds -s S -d (N_ "Sort by size") - complete $cmds -s c -d (N_ "Show and sort by ctime") - complete $cmds -s f -d (N_ "Don't sort") - complete $cmds -s g -d (N_ "Long format without owner") - complete $cmds -s k -d (N_ "Set blocksize to 1kB") - complete $cmds -s l -d (N_ "Long format") - complete $cmds -s m -d (N_ "Comma separated format") - complete $cmds -s t -d (N_ "Sort by modification time") - complete $cmds -s u -d (N_ "Show access time") - complete $cmds -s x -d (N_ "List entries by lines") - complete $cmds -s 1 -d (N_ "List one file per line") + complete $cmds -s C --description "List by columns" + complete $cmds -s S --description "Sort by size" + complete $cmds -s c --description "Show and sort by ctime" + complete $cmds -s f --description "Don't sort" + complete $cmds -s g --description "Long format without owner" + complete $cmds -s k --description "Set blocksize to 1kB" + complete $cmds -s l --description "Long format" + complete $cmds -s m --description "Comma separated format" + complete $cmds -s t --description "Sort by modification time" + complete $cmds -s u --description "Show access time" + complete $cmds -s x --description "List entries by lines" + complete $cmds -s 1 --description "List one file per line" if test -n "$is_gnu" # GNU specific ls switches - complete $cmds -l hide -d (N_ "Do not list implied entries matching specified shell pattern") -r - complete $cmds -l lcontext -d (N_ "Display security context") - complete $cmds -l context -s Z -d (N_ "Display security context so it fits on most displays") - complete $cmds -l scontext -d (N_ "Display only security context and file name") + complete $cmds -l hide --description "Do not list implied entries matching specified shell pattern" -r + complete $cmds -l lcontext --description "Display security context" + complete $cmds -l context -s Z --description "Display security context so it fits on most displays" + complete $cmds -l scontext --description "Display only security context and file name" - complete $cmds -l author -d (N_ "Print author") - complete $cmds -l blocksize -x -d (N_ "Set block size") - complete $cmds -s B -l ignore-backups -d (N_ "Ignore files ending with ~") - complete $cmds -l color -f -a "never always auto" -d (N_ "Use colors") - complete $cmds -s D -l dired -d (N_ "Generate dired output") - complete $cmds -l format -x -a "across commas horizontal long single-column verbose vertical" -d (N_ "List format") - complete $cmds -l full-time -d (N_ "Long format, full-iso time") - complete $cmds -s G -l no-group -d (N_ "Don't print group information") - complete $cmds -l si -d (N_ "Human readable sizes, powers of 1000") - complete $cmds -l dereference-command-line-symlink-to-dir #-d (N_ "Follow directory symlinks from command line") - complete $cmds -l indicator-style -x -a "none classify file-type" -d (N_ "Append filetype indicator") - complete $cmds -s I -l ignore -r -d (N_ "Skip entries matching pattern") - complete $cmds -s N -l literal -d (N_ "Print raw entry names") - complete $cmds -s o -d (N_ "Long format without groups") - complete $cmds -l show-control-chars -d (N_ "Non graphic as-is") - complete $cmds -s Q -l quote-name -d (N_ "Enclose entry in quotes") - complete $cmds -l quoting-style -x -a "literal locale shell shell-always c escape" -d (N_ "Select quoting style") - complete $cmds -l sort -x -d (N_ "Sort criteria") -a " + complete $cmds -l author --description "Print author" + complete $cmds -l blocksize -x --description "Set block size" + complete $cmds -s B -l ignore-backups --description "Ignore files ending with ~" + complete $cmds -l color -f -a "never always auto" --description "Use colors" + complete $cmds -s D -l dired --description "Generate dired output" + complete $cmds -l format -x -a "across commas horizontal long single-column verbose vertical" --description "List format" + complete $cmds -l full-time --description "Long format, full-iso time" + complete $cmds -s G -l no-group --description "Don't print group information" + complete $cmds -l si --description "Human readable sizes, powers of 1000" + complete $cmds -l dereference-command-line-symlink-to-dir #--description "Follow directory symlinks from command line" + complete $cmds -l indicator-style -x -a "none classify file-type" --description "Append filetype indicator" + complete $cmds -s I -l ignore -r --description "Skip entries matching pattern" + complete $cmds -s N -l literal --description "Print raw entry names" + complete $cmds -s o --description "Long format without groups" + complete $cmds -l show-control-chars --description "Non graphic as-is" + complete $cmds -s Q -l quote-name --description "Enclose entry in quotes" + complete $cmds -l quoting-style -x -a "literal locale shell shell-always c escape" --description "Select quoting style" + complete $cmds -l sort -x --description "Sort criteria" -a " extension\t'Sort by file extension' none\tDon\'t\ sort size\t'Sort by size' @@ -79,35 +79,35 @@ function __fish_complete_ls -d "Compleletions for ls and its aliases" access\t'Sort by access time' use\t'Sort by access time' " - complete $cmds -l time -x -d (N_ "Show time type") -a " + complete $cmds -l time -x --description "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 $cmds -l time-style -x -a "full-iso long-iso iso locale" -d (N_ "Select time style") - complete $cmds -s T -l tabsize -x -a "1 2 3 4 5 6 7 8 9 10 11 12" -d (N_ "Assume tab stops at each COLS") - complete $cmds -s U -d (N_ "Do not sort") - complete $cmds -s v -d (N_ "Sort by version") - complete $cmds -s w -l width -x -d (N_ "Assume screen width") - complete $cmds -s X -d (N_ "Sort by extension") - complete $cmds -l help -d (N_ "Display help and exit") - complete $cmds -l version -d (N_ "Display version and exit") + complete $cmds -l time-style -x -a "full-iso long-iso iso locale" --description "Select time style" + complete $cmds -s T -l tabsize -x -a "1 2 3 4 5 6 7 8 9 10 11 12" --description "Assume tab stops at each COLS" + complete $cmds -s U --description "Do not sort" + complete $cmds -s v --description "Sort by version" + complete $cmds -s w -l width -x --description "Assume screen width" + complete $cmds -s X --description "Sort by extension" + complete $cmds -l help --description "Display help and exit" + complete $cmds -l version --description "Display version and exit" else # If not a GNU system, assume we have standard BSD ls features instead - complete $cmds -s B -d (N_ "Octal escapes for non graphic characters") - complete $cmds -s G -d (N_ "Use colors") - complete $cmds -s I -d (N_ "Prevent -A from being automatically set for root") - complete $cmds -s P -d (N_ "Don't follow symlinks") - complete $cmds -s T -d (N_ "Show modification time") - complete $cmds -s W -d (N_ "Show whiteouts when scanning directories") - complete $cmds -s Z -d (N_ "Display each file's MAC label") - complete $cmds -s o -d (N_ "Include the file flags in a long (-l) output") - complete $cmds -s w -d (N_ "Print raw entry names") + complete $cmds -s B --description "Octal escapes for non graphic characters" + complete $cmds -s G --description "Use colors" + complete $cmds -s I --description "Prevent -A from being automatically set for root" + complete $cmds -s P --description "Don't follow symlinks" + complete $cmds -s T --description "Show modification time" + complete $cmds -s W --description "Show whiteouts when scanning directories" + complete $cmds -s Z --description "Display each file's MAC label" + complete $cmds -s o --description "Include the file flags in a long (-l) output" + complete $cmds -s w --description "Print raw entry names" end diff --git a/share/functions/__fish_complete_ssh.fish b/share/functions/__fish_complete_ssh.fish index f4c93392..24123996 100644 --- a/share/functions/__fish_complete_ssh.fish +++ b/share/functions/__fish_complete_ssh.fish @@ -1,15 +1,15 @@ function __fish_complete_ssh -d "common completions for ssh commands" - complete -c $argv -s 1 -d (N_ "Protocoll version 1 only") - complete -c $argv -s 2 -d (N_ "Protocoll version 2 only") - complete -c $argv -s 4 -d (N_ "IPv4 addresses only") - complete -c $argv -s 6 -d (N_ "IPv6 addresses only") - complete -c $argv -s C -d (N_ "Compress all data") - complete -xc $argv -s c -d (N_ "Encryption algorithm") -a "blowfish 3des des" - complete -r -c $argv -s F -d (N_ "Configuration file") - complete -r -c $argv -s i -d (N_ "Identity file") - complete -x -c $argv -s o -d (N_ "Options") -a " + complete -c $argv -s 1 --description "Protocoll version 1 only" + complete -c $argv -s 2 --description "Protocoll version 2 only" + complete -c $argv -s 4 --description "IPv4 addresses only" + complete -c $argv -s 6 --description "IPv6 addresses only" + complete -c $argv -s C --description "Compress all data" + complete -xc $argv -s c --description "Encryption algorithm" -a "blowfish 3des des" + complete -r -c $argv -s F --description "Configuration file" + complete -r -c $argv -s i --description "Identity file" + complete -x -c $argv -s o --description "Options" -a " AddressFamily BatchMode BindAddress @@ -56,6 +56,6 @@ function __fish_complete_ssh -d "common completions for ssh commands" UserKnownHostsFile VerifyHostKeyDNS " - complete -c $argv -s v -d (N_ "Verbose mode") + complete -c $argv -s v --description "Verbose mode" end diff --git a/share/functions/__fish_complete_tex.fish b/share/functions/__fish_complete_tex.fish index cf461641..637b7464 100644 --- a/share/functions/__fish_complete_tex.fish +++ b/share/functions/__fish_complete_tex.fish @@ -1,8 +1,8 @@ function __fish_complete_tex -d "Common completions for all tex commands" - complete -c $argv -o help -d (N_ "Display help and exit") - complete -c $argv -o version -d (N_ "Display version and exit") + 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' )" |