From d79e8c7f62472c5f47871d1ad8351ce848b2c6b4 Mon Sep 17 00:00:00 2001 From: axel Date: Fri, 9 Jun 2006 09:58:11 +1000 Subject: [PATCH] Documentation updates, mostly corrections and cla -\section faq-cwd-symlink Why does cd, pwd and other fish commands always resolve symlinked directories to their canonical path? +\section faq-cwd-symlink Why does cd, $PWD and and various fish commands always resolve symlinked directories to their canonical path? For example if ~/images is a symlink to ~/Documents/Images, if I write diff --git a/doc_src/function.txt b/doc_src/function.txt index 6d121cb72..612b663bd 100644 --- a/doc_src/function.txt +++ b/doc_src/function.txt @@ -1,16 +1,16 @@ \section function function - create a function \subsection function-synopsis Synopsis - function [OPTIONS] NAME; BODY; end + function [OPTIONS] NAME; BODY; end \subsection function-description Description - \c -b or \c --key-binding specifies that the function is a key biding. Key binding functions work exactly like regular functions except that they can not be tab-completed, and may contain the '-' character. -- -d DESCRIPTION or \c --description=DESCRIPTION is a description of what the function does, suitable as a completion description -- -j PID or --on-job-exit PID tells fish to run this function when the job with group id PID exits -- -p PID or --on-process-exit PID tells fish to run this function when the fish child process with process id PID exits -- -s or --on-signal SIGSPEC tells fish to run this function when the signal SIGSPEC is delivered. SIGSPEC can be a signal number, or the signal name, such as SIGHUP (or just HUP) -- -v or --on-variable VARIABLE_NAME tells fish to run this function when the variable VARIABLE_NAME changes value +- -d DESCRIPTION or \c --description=DESCRIPTION is a description of what the function does, suitable as a completion description +- -j PID or --on-job-exit PID tells fish to run this function when the job with group id PID exits +- -p PID or --on-process-exit PID tells fish to run this function when the fish child process with process id PID exits +- -s or --on-signal SIGSPEC tells fish to run this function when the signal SIGSPEC is delivered. SIGSPEC can be a signal number, or the signal name, such as SIGHUP (or just HUP) +- -v or --on-variable VARIABLE_NAME tells fish to run this function when the variable VARIABLE_NAME changes value This builtin command is used to create a new function. A Function is a list of commands that will be executed when the name of the function @@ -22,7 +22,7 @@ function hi end -will write hello whenever the user enters \c hi. +will write hello whenever the user enters \c hi. If the user enters any additional arguments after the function, they are inserted into the environment variable array argv. diff --git a/doc_src/functions.txt b/doc_src/functions.txt index 5751fb716..9def57910 100644 --- a/doc_src/functions.txt +++ b/doc_src/functions.txt @@ -1,17 +1,22 @@ \section functions functions - print or erase functions \subsection function-synopsis Synopsis -functions [-e] FUNCTIONS... +functions [-e] FUNCTIONS... \subsection functions-description Description This builtin command is used to print or erase functions. -- -e or --erase causes the specified functions to be erased. -- -n or --names List only the names of all defined functions +- -a or --all list all functions, even those whose name start with an underscore. +- -d DESCRIPTION or --description=DESCRIPTION change the description of this function +- -e or --erase causes the specified functions to be erased. +- -h or --help display a help message and exit +- -n or --names list only the names of all defined functions If \c functions is called with no arguments, the names and definition of all functions are printed, otherwise, the specified function definitions will be printed. +If a function is automatically loaded, using functions -e +to erase it will not remove the function. diff --git a/doc_src/jobs.txt b/doc_src/jobs.txt index 28a5aa700..4ed0db9b7 100644 --- a/doc_src/jobs.txt +++ b/doc_src/jobs.txt @@ -1,18 +1,19 @@ \section jobs jobs - print currently running jobs \subsection jobs-synopsis -jobs [OPTIONS] [PID] +jobs [OPTIONS] [PID] \subsection jobs-description Description -The jobs builtin causes fish to print a list of the currently +The jobs builtin causes fish to print a list of the currently running jobs and their status. jobs accepts the following switches: -- -c or --command print the command name for each process in jobs -- -g or --group only print the group id of each job -- -l or --last only the last job to be started is printed -- -p or --process print the process id for each process in all jobs +- -c or --command print the command name for each process in jobs +- -g or --group only print the group id of each job +- -h or --help display a help message and exit +- -l or --last only the last job to be started is printed +- -p or --pid print the process id for each process in all jobs On systems that supports this feature, jobs will print the CPU usage of each job since the last command was executed. The CPU usage is diff --git a/doc_src/set.txt b/doc_src/set.txt index 93e1d9672..78d26183f 100644 --- a/doc_src/set.txt +++ b/doc_src/set.txt @@ -38,10 +38,15 @@ expanding or assigning to an array variable, the index will be calculated from the end of the array. For example, the index -1 means the last index of an array. +The scoping rules when creating or updating a variable are: + -# If a variable is explicitly set to either universal, global or local, that setting will be honored. If a variable of the same name exists in a different scope, that variable will not be changed. -# If a variable is not explicitly set to be either universal, global or local, but has been previously defined, the previos variable scope is used. -# If a variable is not explicitly set to be either universal, global or local and has never before been defined, the variable will be local to the currently executing functions. If no function is executing, the variable will be global. +The exporting rules when creating or updating a variable are identical +to the scoping rules for variables: + -# If a variable is explicitly set to either be exported or not exported, that setting will be honored. -# If a variable is not explicitly set to be exported or not exported, but has been previously defined, the previous exporting rule for the variable is kept. -# If a variable is not explicitly set to be either global or local and has never before been defined, the variable will not be exported. @@ -65,7 +70,7 @@ variable assignments where sucessfully performed, with a non-zero exit status otherwise. In query mode, the exit status is the number of variables that where not found. In erase mode, set exits with a zero exit status in case of success, with a non-zero exit status if the -commandline was invalid, if the variable was readprotected or if the +commandline was invalid, if the variable was write-protected or if the variable did not exist. \subsection set-example Example