aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src
diff options
context:
space:
mode:
authorGravatar Jan Kanis <jan.code@jankanis.nl>2013-01-01 22:56:08 +0100
committerGravatar Jan Kanis <jan.code@jankanis.nl>2013-01-01 22:56:08 +0100
commita4c646f75cc5254d0290446572d82ff5c66da602 (patch)
tree18d034117329d6bc223b4c114e775af2460b85e9 /doc_src
parent1ae0e5d7cb9a227f2e2fcc33ce3b41acd0ab9e14 (diff)
make 'alias' check for recursive calls and insert 'command'; update docs, fix #486
Diffstat (limited to 'doc_src')
-rw-r--r--doc_src/function.txt2
-rw-r--r--doc_src/index.hdr.in4
-rw-r--r--doc_src/type.txt2
3 files changed, 4 insertions, 4 deletions
diff --git a/doc_src/function.txt b/doc_src/function.txt
index 4761a5d9..10d9eec0 100644
--- a/doc_src/function.txt
+++ b/doc_src/function.txt
@@ -44,7 +44,7 @@ will run the \c ls command, using the \c -l option, while passing on any additio
<pre>
function mkdir -d "Create a directory and set CWD"
- mkdir $argv
+ command mkdir $argv
if test $status = 0
switch $argv[(count $argv)]
case '-*'
diff --git a/doc_src/index.hdr.in b/doc_src/index.hdr.in
index f03b3036..1df30947 100644
--- a/doc_src/index.hdr.in
+++ b/doc_src/index.hdr.in
@@ -284,7 +284,7 @@ turning on colors on GNU systems is \c '--color=auto'. A wrapper
around \c ls might look like this:
<pre>function ls
- ls --color=auto $argv
+ command ls --color=auto $argv
end
</pre>
@@ -292,7 +292,7 @@ There are a few important things that need to be noted about wrapper
functions:
- Wrappers should always take care to add the $argv variable to the list of parameters to the wrapped command. This makes sure that if the user specifies any additional parameters to the function, they are passed on to the underlying command.
-- If the wrapped command is not the first command to be called by the wrapper, it is necessary to prefix the call to the command with the word 'command' in order to tell fish that the function should not call itself, but rather a command with the same name. Failing to do so will cause infinite recursion bugs.
+- If the wrapper has the same name as the wrapped command, it is necessary to prefix the call to the command with the word 'command' in order to tell fish that the function should not call itself, but rather a command with the same name. Failing to do so will cause infinite recursion bugs.
\subsubsection syntax-function-autoloading Autoloading functions
diff --git a/doc_src/type.txt b/doc_src/type.txt
index 593da3b9..dde72364 100644
--- a/doc_src/type.txt
+++ b/doc_src/type.txt
@@ -10,7 +10,7 @@ With no options, indicate how each name would be interpreted if used as a comman
- \c -h or \c --help print this message
- \c -a or \c --all print all of possible definitions of the specified names
- \c -f or \c --no-functions suppresses function and builtin lookup
-- \c -t or \c --type print a string which is one of alias, keyword, function, builtin, or file if name is an alias, shell reserved word, function, builtin, or disk file, respectively
+- \c -t or \c --type print a string which is one of keyword, function, builtin, or file if name is a shell reserved word, function, builtin, or disk file, respectively
- \c -p or \c --path either return the name of the disk file that would be executed if name were specified as a command name, or nothing if 'type -t name' would not return 'file'
- \c -P or \c --force-path either return the name of the disk file that would be executed if name were specified as a command name, or nothing no file with the specified name could be found in the PATH