From e6e287ae1f4470ac0a9927bd6184f6536c4d797a Mon Sep 17 00:00:00 2001 From: axel Date: Thu, 16 Feb 2006 03:59:25 +1000 Subject: [PATCH] Make function descriptions for dynamically loaded functions translatable darcs-hash:20060215175925-ac50b-5dc52c615650779771a6c4a3c5d006b72dbca67d.gz --- init/functions/cd.fish | 2 +- init/functions/contains.fish | 2 +- init/functions/dirh.fish | 2 +- init/functions/dirs.fish | 2 +- init/functions/help.fish | 2 +- init/functions/la.fish | 2 +- init/functions/ll.fish | 2 +- init/functions/ls.fish | 4 ++-- init/functions/nextd.fish | 2 +- init/functions/open.fish | 2 +- init/functions/popd.fish | 2 +- init/functions/prevd.fish | 2 +- init/functions/psub.fish | 2 +- init/functions/pushd.fish | 2 +- init/functions/pwd.fish | 2 +- init/functions/type.fish | 2 +- init/functions/umask.fish | 4 ++-- init/functions/vared.fish | 2 +- 18 files changed, 20 insertions(+), 20 deletions(-) diff --git a/init/functions/cd.fish b/init/functions/cd.fish index 3fef9136f..e9287c4be 100644 --- a/init/functions/cd.fish +++ b/init/functions/cd.fish @@ -2,7 +2,7 @@ # The following functions add support for a directory history # -function cd -d "Change directory" +function cd -d (_ "Change directory") # Skip history in subshells if status --is-command-substitution diff --git a/init/functions/contains.fish b/init/functions/contains.fish index 76694608e..331794c72 100644 --- a/init/functions/contains.fish +++ b/init/functions/contains.fish @@ -5,7 +5,7 @@ # internally by fish. # -function contains -d "Test if a key is contained in a set of values" +function contains -d (_ "Test if a key is contained in a set of values") while set -q argv switch $argv[1] case '-h' '--h' '--he' '--hel' '--help' diff --git a/init/functions/dirh.fish b/init/functions/dirh.fish index 82eb5a292..8be46c818 100644 --- a/init/functions/dirh.fish +++ b/init/functions/dirh.fish @@ -1,5 +1,5 @@ -function dirh -d "Print the current directory history (the back- and fwd- lists)" +function dirh -d (_ "Print the current directory history (the back- and fwd- lists)") # Avoid set comment set -l current (command pwd) set -l separator " " diff --git a/init/functions/dirs.fish b/init/functions/dirs.fish index 5f0c47e5f..cde428aae 100644 --- a/init/functions/dirs.fish +++ b/init/functions/dirs.fish @@ -1,4 +1,4 @@ -function dirs -d "Print directory stack" +function dirs -d (_ "Print directory stack") echo -n (command pwd)" " for i in $dirstack echo -n $i" " diff --git a/init/functions/help.fish b/init/functions/help.fish index 1dff5f916..f61822ff0 100644 --- a/init/functions/help.fish +++ b/init/functions/help.fish @@ -7,7 +7,7 @@ # theoretical problem. # -function help -d "Show help for the fish shell" +function help -d (_ "Show help for the fish shell") # Declare variables to set correct scope set -l fish_browser diff --git a/init/functions/la.fish b/init/functions/la.fish index e831eaa14..4fddc3b18 100644 --- a/init/functions/la.fish +++ b/init/functions/la.fish @@ -1,7 +1,7 @@ # # These are very common and useful # -function la -d "List contents, including hidden fiels in directory using long format" +function la -d (_ "List contents of directory, including hidden files in directory using long format") ls -lah $argv end diff --git a/init/functions/ll.fish b/init/functions/ll.fish index 9f8114017..bfe290abd 100644 --- a/init/functions/ll.fish +++ b/init/functions/ll.fish @@ -1,7 +1,7 @@ # # These are very common and useful # -function ll -d "List contents of directory using long format" +function ll -d (_ "List contents of directory using long format") ls -lh $argv end diff --git a/init/functions/ls.fish b/init/functions/ls.fish index 3f96812a3..aa20f219c 100644 --- a/init/functions/ls.fish +++ b/init/functions/ls.fish @@ -4,13 +4,13 @@ if ls --version 1>/dev/null 2>/dev/null # This is GNU ls - function ls -d "List contents of directory" + function ls -d (_ "List contents of directory") command ls --color=auto --indicator-style=classify $argv end else # BSD, OS X and a few more support colors through the -G switch instead if ls / -G 1>/dev/null 2>/dev/null - function ls -d "List contents of directory" + function ls -d (_ "List contents of directory") command ls -G $argv end end diff --git a/init/functions/nextd.fish b/init/functions/nextd.fish index 293e7fd95..bf6f32f87 100644 --- a/init/functions/nextd.fish +++ b/init/functions/nextd.fish @@ -1,5 +1,5 @@ -function nextd -d "Move forward in the directory history" +function nextd -d (_ "Move forward in the directory history") # Parse arguments set -l show_hist 0 set -l times 1 diff --git a/init/functions/open.fish b/init/functions/open.fish index bfe0f99e1..9e61f2362 100644 --- a/init/functions/open.fish +++ b/init/functions/open.fish @@ -5,7 +5,7 @@ # if not test (uname) = Darwin - function open -d "Open file in default application" + function open -d (_ "Open file in default application") mimedb -l -- $argv end end diff --git a/init/functions/popd.fish b/init/functions/popd.fish index 6aadb7890..f8b8a5328 100644 --- a/init/functions/popd.fish +++ b/init/functions/popd.fish @@ -1,5 +1,5 @@ -function popd -d "Pop dir from stack" +function popd -d (_ "Pop dir from stack") if test $dirstack[1] cd $dirstack[1] else diff --git a/init/functions/prevd.fish b/init/functions/prevd.fish index e71fb2e04..000a57924 100644 --- a/init/functions/prevd.fish +++ b/init/functions/prevd.fish @@ -1,5 +1,5 @@ -function prevd -d "Move back in the directory history" +function prevd -d (_ "Move back in the directory history") # Parse arguments set -l show_hist 0 set -l times 1 diff --git a/init/functions/psub.fish b/init/functions/psub.fish index 974833f21..fd59cd95d 100644 --- a/init/functions/psub.fish +++ b/init/functions/psub.fish @@ -1,6 +1,6 @@ -function psub -d "Read from stdin into a file and output the filename. Remove the file when the command that calles psub exits." +function psub -d (_ "Read from stdin into a file and output the filename. Remove the file when the command that called psub exits.") set -l filename set -l funcname diff --git a/init/functions/pushd.fish b/init/functions/pushd.fish index f9d45d640..5c4f288e1 100644 --- a/init/functions/pushd.fish +++ b/init/functions/pushd.fish @@ -1,6 +1,6 @@ -function pushd -d "Push directory to stack" +function pushd -d (_ "Push directory to stack") # Comment to avoid set completions set -g dirstack (command pwd) $dirstack cd $argv[1] diff --git a/init/functions/pwd.fish b/init/functions/pwd.fish index 3d397aeb7..678fecb48 100644 --- a/init/functions/pwd.fish +++ b/init/functions/pwd.fish @@ -2,6 +2,6 @@ # Make pwd print out the home directory as a tilde. # -function pwd -d "Print working directory" +function pwd -d (_ "Print working directory") command pwd | sed -e 's|/private||' -e "s|^$HOME|~|" end diff --git a/init/functions/type.fish b/init/functions/type.fish index af7e0faa2..bb5c75e0f 100644 --- a/init/functions/type.fish +++ b/init/functions/type.fish @@ -1,5 +1,5 @@ -function type -d "Print the type of a command" +function type -d (_ "Print the type of a command") # Initialize set -l status 1 diff --git a/init/functions/umask.fish b/init/functions/umask.fish index 5392a390c..afca8f5f9 100644 --- a/init/functions/umask.fish +++ b/init/functions/umask.fish @@ -1,5 +1,5 @@ -function __fish_umask_parse -d "Parses a file permission specification as into an octal version" +function __fish_umask_parse -d "Internal umask function" # Test if already a valid octal mask, and pad it with zeros if echo $argv | grep -E '^(0|)[0-7]{1,3}$' >/dev/null for i in (seq (echo 5-(echo $argv|wc -c)|bc)); set argv 0$argv; end @@ -132,7 +132,7 @@ function __fish_umask_print_symbolic echo $res|cut -c 2- end -function umask -d "Set default file permission mask" +function umask -d (_ "Set default file permission mask") set -l as_command 0 set -l symbolic 0 diff --git a/init/functions/vared.fish b/init/functions/vared.fish index f6b442b5f..b9414d845 100644 --- a/init/functions/vared.fish +++ b/init/functions/vared.fish @@ -4,7 +4,7 @@ # value of a variable interactively. # -function vared -d "Edit variable value" +function vared -d (_ "Edit variable value") if test (count $argv) = 1 switch $argv