minor changes on user doc

This commit is contained in:
Jakukyo Friel
2011-02-20 02:58:11 +08:00
parent 2583638f4b
commit cde6067cae

View File

@@ -135,6 +135,10 @@ these characters, so called escape sequences are provided. These are:
- <code>'\\\<'</code>, escapes the less than character - <code>'\\\<'</code>, escapes the less than character
- <code>'\\\>'</code>, escapes the more than character - <code>'\\\>'</code>, escapes the more than character
- <code>'\\^'</code>, escapes the circumflex character - <code>'\\^'</code>, escapes the circumflex character
- <code>'\\&'</code>, escapes the ampersand character
- <code>'\\;'</code>, escapes the semicolon character
- <code>'\\"'</code>, escapes the quote character
- <code>'\\''</code>, escapes the apostrophe character
- <code>'\\x<i>xx</i>'</code>, where <code><i>xx</i></code> is a hexadecimal number, escapes the ascii character with the specified value. For example, \\x9 is the tab character. - <code>'\\x<i>xx</i>'</code>, where <code><i>xx</i></code> is a hexadecimal number, escapes the ascii character with the specified value. For example, \\x9 is the tab character.
- <code>'\\X<i>xx</i>'</code>, where <code><i>xx</i></code> is a hexadecimal number, escapes a byte of data with the specified value. If you are using a mutibyte encoding, this can be used to enter invalid strings. Only use this if you know what you are doing. - <code>'\\X<i>xx</i>'</code>, where <code><i>xx</i></code> is a hexadecimal number, escapes a byte of data with the specified value. If you are using a mutibyte encoding, this can be used to enter invalid strings. Only use this if you know what you are doing.
- <code>'\\<i>ooo</i>'</code>, where <code><i>ooo</i></code> is an octal number, escapes the ascii character with the specified value. For example, \\011 is the tab character. - <code>'\\<i>ooo</i>'</code>, where <code><i>ooo</i></code> is an octal number, escapes the ascii character with the specified value. For example, \\011 is the tab character.
@@ -620,9 +624,8 @@ The {$USER}san syntax might need a bit of an elaboration. Posix
shells allow you to specify a variable name using '$VARNAME' or shells allow you to specify a variable name using '$VARNAME' or
'${VARNAME}'. Fish supports the former, and has no support whatsoever '${VARNAME}'. Fish supports the former, and has no support whatsoever
for the latter or anything like it. So what is '{$VARNAME}' then? for the latter or anything like it. So what is '{$VARNAME}' then?
Well, '{WHATEVER}' is <a href='#brace'>brace expansion</a>, identical Well, '{WHATEVER}' is <a href='#brace'>brace expansion</a>, e.g. 'a{b,c}d' -> 'abd acd'.
to that supported by e.g. bash. 'a{b,c}d' -> 'abd acd' works So '{$VARNAME}' is a bracket-expansion with
both in bash and on fish. So '{$VARNAME}' is a bracket-expansion with
only a single element, i.e. it becomes expanded to '$VARNAME', which only a single element, i.e. it becomes expanded to '$VARNAME', which
will be variable expanded to the value of the variable 'VARNAME'. So will be variable expanded to the value of the variable 'VARNAME'. So
you might think that the brackets don't actually do anything, and that you might think that the brackets don't actually do anything, and that
@@ -684,7 +687,7 @@ The \% (percent) character at the beginning of a parameter followed by
a string is expanded into a process id. The following expansions are a string is expanded into a process id. The following expansions are
performed: performed:
- If the string is the entire word \c self, the shells pid is the result - If the string is the entire word \c self, the shells pid is the result.
- Otherwise, if the string is the id of a job, the result is the process - Otherwise, if the string is the id of a job, the result is the process
group id of the job. group id of the job.
- Otherwise, if any child processes match the specified string, their - Otherwise, if any child processes match the specified string, their