mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 20:33:08 +00:00
Make all descriptions for function calls use the implicit translation from the previous patch instead of explicitly using N_
darcs-hash:20070116012918-ac50b-c1c0df64333ad910ca81dbc86ad193ece6680722.gz
This commit is contained in:
parent
34e27ff4c2
commit
7492b6cdb3
26 changed files with 30 additions and 30 deletions
|
@ -5,11 +5,11 @@
|
||||||
|
|
||||||
set -l path (which $i ^/dev/null)
|
set -l path (which $i ^/dev/null)
|
||||||
if test -x (echo $path)
|
if test -x (echo $path)
|
||||||
function _ -d "Alias for the gettext command"
|
function _ --description "Alias for the gettext command"
|
||||||
gettext fish $argv
|
gettext fish $argv
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
function _ -d "Alias for the gettext command"
|
function _ --description "Alias for the gettext command"
|
||||||
printf "%s" $argv
|
printf "%s" $argv
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
function __fish_print_help -d (N_ "Print help message for the specified fish function or builtin")
|
function __fish_print_help --description "Print help message for the specified fish function or builtin"
|
||||||
|
|
||||||
# These two expressions take care of underlines (Should be italic)
|
# These two expressions take care of underlines (Should be italic)
|
||||||
set -l cmd1 s/_\x08'\(.\)'/(set_color --underline)\\1(set_color normal)/g
|
set -l cmd1 s/_\x08'\(.\)'/(set_color --underline)\\1(set_color normal)/g
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
function alias -d (_ "Legacy function for creating shellscript functions using an alias-like syntax")
|
function alias --description "Legacy function for creating shellscript functions using an alias-like syntax"
|
||||||
|
|
||||||
if count $argv >/dev/null
|
if count $argv >/dev/null
|
||||||
switch $argv[1]
|
switch $argv[1]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# The following functions add support for a directory history
|
# The following functions add support for a directory history
|
||||||
#
|
#
|
||||||
|
|
||||||
function cd -d (N_ "Change directory")
|
function cd --description "Change directory"
|
||||||
|
|
||||||
# Skip history in subshells
|
# Skip history in subshells
|
||||||
if status --is-command-substitution
|
if status --is-command-substitution
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
function contains -d (N_ "Test if a key is contained in a set of values")
|
function contains --description "Test if a key is contained in a set of values"
|
||||||
while count $argv >/dev/null
|
while count $argv >/dev/null
|
||||||
switch $argv[1]
|
switch $argv[1]
|
||||||
case '-h' '--h' '--he' '--hel' '--help'
|
case '-h' '--h' '--he' '--hel' '--help'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
function dirh -d (N_ "Print the current directory history (the back- and fwd- lists)")
|
function dirh --description "Print the current directory history (the back- and fwd- lists)"
|
||||||
|
|
||||||
if count $argv >/dev/null
|
if count $argv >/dev/null
|
||||||
switch $argv[1]
|
switch $argv[1]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
function dirs -d (N_ "Print directory stack")
|
function dirs --description "Print directory stack"
|
||||||
echo -n (command pwd)" "
|
echo -n (command pwd)" "
|
||||||
for i in $dirstack
|
for i in $dirstack
|
||||||
echo -n $i" "
|
echo -n $i" "
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# string has a newline before and after, so that fish will know how
|
# string has a newline before and after, so that fish will know how
|
||||||
# long it is.
|
# long it is.
|
||||||
|
|
||||||
function fish_prompt -d (N_ "Write out the prompt")
|
function fish_prompt --description "Write out the prompt"
|
||||||
|
|
||||||
# Just calculate these once, to save a few cycles when displaying the prompt
|
# Just calculate these once, to save a few cycles when displaying the prompt
|
||||||
if not set -q __fish_prompt_hostname
|
if not set -q __fish_prompt_hostname
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# theoretical problem.
|
# theoretical problem.
|
||||||
#
|
#
|
||||||
|
|
||||||
function help -d (N_ "Show help for the fish shell")
|
function help --description "Show help for the fish shell"
|
||||||
|
|
||||||
# Declare variables to set correct scope
|
# Declare variables to set correct scope
|
||||||
set -l fish_browser
|
set -l fish_browser
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#
|
#
|
||||||
# These are very common and useful
|
# These are very common and useful
|
||||||
#
|
#
|
||||||
function la -d (N_ "List contents of directory, including hidden files in directory using long format")
|
function la --description "List contents of directory, including hidden files in directory using long format"
|
||||||
ls -lah $argv
|
ls -lah $argv
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#
|
#
|
||||||
# These are very common and useful
|
# These are very common and useful
|
||||||
#
|
#
|
||||||
function ll -d (N_ "List contents of directory using long format")
|
function ll --description "List contents of directory using long format"
|
||||||
ls -lh $argv
|
ls -lh $argv
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
if command ls --version 1>/dev/null 2>/dev/null
|
if command ls --version 1>/dev/null 2>/dev/null
|
||||||
# This is GNU ls
|
# This is GNU ls
|
||||||
function ls -d (N_ "List contents of directory")
|
function ls --description "List contents of directory"
|
||||||
set -l param --color=auto
|
set -l param --color=auto
|
||||||
if isatty 1
|
if isatty 1
|
||||||
set param $param --indicator-style=classify
|
set param $param --indicator-style=classify
|
||||||
|
@ -21,7 +21,7 @@ if command ls --version 1>/dev/null 2>/dev/null
|
||||||
else
|
else
|
||||||
# BSD, OS X and a few more support colors through the -G switch instead
|
# BSD, OS X and a few more support colors through the -G switch instead
|
||||||
if command ls / -G 1>/dev/null 2>/dev/null
|
if command ls / -G 1>/dev/null 2>/dev/null
|
||||||
function ls -d (N_ "List contents of directory")
|
function ls --description "List contents of directory"
|
||||||
command ls -G $argv
|
command ls -G $argv
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
function math -d (N_ "Perform math calculations in bc")
|
function math --description "Perform math calculations in bc"
|
||||||
if count $argv >/dev/null
|
if count $argv >/dev/null
|
||||||
switch $argv[1]
|
switch $argv[1]
|
||||||
case -h --h --he --hel --help
|
case -h --h --he --hel --help
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
function nextd -d (N_ "Move forward in the directory history")
|
function nextd --description "Move forward in the directory history"
|
||||||
|
|
||||||
if count $argv >/dev/null
|
if count $argv >/dev/null
|
||||||
switch $argv[1]
|
switch $argv[1]
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
if not test (uname) = Darwin
|
if not test (uname) = Darwin
|
||||||
function open -d (N_ "Open file in default application")
|
function open --description "Open file in default application"
|
||||||
if count $argv >/dev/null
|
if count $argv >/dev/null
|
||||||
switch $argv[1]
|
switch $argv[1]
|
||||||
case -h --h --he --hel --help
|
case -h --h --he --hel --help
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
function popd -d (N_ "Pop dir from stack")
|
function popd --description "Pop dir from stack"
|
||||||
if count $argv >/dev/null
|
if count $argv >/dev/null
|
||||||
switch $argv[1]
|
switch $argv[1]
|
||||||
case -h --h --he --hel --help
|
case -h --h --he --hel --help
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
function prevd -d (N_ "Move back in the directory history")
|
function prevd --description "Move back in the directory history"
|
||||||
|
|
||||||
if count $argv >/dev/null
|
if count $argv >/dev/null
|
||||||
switch $argv[1]
|
switch $argv[1]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
if test (uname) = Darwin
|
if test (uname) = Darwin
|
||||||
function prompt_pwd -d (N_ "Print the current working directory, shortend to fit the prompt")
|
function prompt_pwd --description "Print the current working directory, shortend to fit the prompt"
|
||||||
if test "$PWD" != "$HOME"
|
if test "$PWD" != "$HOME"
|
||||||
printf "%s" (echo $PWD|sed -e 's|/private||' -e "s|^$HOME|~|" -e 's-/\([^/]\)\([^/]*\)-/\1-g')
|
printf "%s" (echo $PWD|sed -e 's|/private||' -e "s|^$HOME|~|" -e 's-/\([^/]\)\([^/]*\)-/\1-g')
|
||||||
echo $PWD|sed -e 's-.*/[^/]\([^/]*$\)-\1-'
|
echo $PWD|sed -e 's-.*/[^/]\([^/]*$\)-\1-'
|
||||||
|
@ -9,7 +9,7 @@ if test (uname) = Darwin
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
function prompt_pwd -d (N_ "Print the current working directory, shortend to fit the prompt")
|
function prompt_pwd --description "Print the current working directory, shortend to fit the prompt"
|
||||||
if test "$PWD" != "$HOME"
|
if test "$PWD" != "$HOME"
|
||||||
printf "%s" (echo $PWD|sed -e "s|^$HOME|~|" -e 's-/\([^/]\)\([^/]*\)-/\1-g')
|
printf "%s" (echo $PWD|sed -e "s|^$HOME|~|" -e 's-/\([^/]\)\([^/]*\)-/\1-g')
|
||||||
echo $PWD|sed -n -e 's-.*/[^/]\([^/]*$\)-\1-p'
|
echo $PWD|sed -n -e 's-.*/[^/]\([^/]*$\)-\1-p'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
|
|
||||||
function psub -d (N_ "Read from stdin into a file and output the filename. Remove the file when the command that called psub exits.")
|
function psub --description "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 filename
|
||||||
set -l funcname
|
set -l funcname
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
|
|
||||||
function pushd -d (N_ "Push directory to stack")
|
function pushd --description "Push directory to stack"
|
||||||
if count $argv >/dev/null
|
if count $argv >/dev/null
|
||||||
switch $argv[1]
|
switch $argv[1]
|
||||||
case -h --h --he --hel --help
|
case -h --h --he --hel --help
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
if test (uname) = Darwin
|
if test (uname) = Darwin
|
||||||
function pwd -d (N_ "Print working directory")
|
function pwd --description "Print working directory"
|
||||||
echo $PWD | sed -e 's|/private||' -e "s|^$HOME|~|"
|
echo $PWD | sed -e 's|/private||' -e "s|^$HOME|~|"
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
function pwd -d (N_ "Print working directory")
|
function pwd --description "Print working directory"
|
||||||
echo $PWD | sed -e "s|^$HOME|~|"
|
echo $PWD | sed -e "s|^$HOME|~|"
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
function save_function -d (N_ "Save the current definition of all specified functions to file")
|
function save_function --description "Save the current definition of all specified functions to file"
|
||||||
|
|
||||||
if count $argv >/dev/null
|
if count $argv >/dev/null
|
||||||
switch $argv[1]
|
switch $argv[1]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
|
|
||||||
function setenv -d (N_ 'Set global variable. Alias for set -g, made for csh compatibility')
|
function setenv --description 'Set global variable. Alias for set -g, made for csh compatibility'
|
||||||
set -gx $argv
|
set -gx $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
function type -d (N_ "Print the type of a command")
|
function type --description "Print the type of a command"
|
||||||
|
|
||||||
# Initialize
|
# Initialize
|
||||||
set -l res 1
|
set -l res 1
|
||||||
|
|
|
@ -134,7 +134,7 @@ function __fish_umask_print_symbolic
|
||||||
echo $res|cut -c 2-
|
echo $res|cut -c 2-
|
||||||
end
|
end
|
||||||
|
|
||||||
function umask -d (N_ "Set default file permission mask")
|
function umask --description "Set default file permission mask"
|
||||||
|
|
||||||
set -l as_command 0
|
set -l as_command 0
|
||||||
set -l symbolic 0
|
set -l symbolic 0
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# value of a variable interactively.
|
# value of a variable interactively.
|
||||||
#
|
#
|
||||||
|
|
||||||
function vared -d (N_ "Edit variable value")
|
function vared --description "Edit variable value"
|
||||||
if test (count $argv) = 1
|
if test (count $argv) = 1
|
||||||
switch $argv
|
switch $argv
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue