core/builtins/source.cif
changeset 0 7f656887cf89
child 75 3c3961c1ae26
equal deleted inserted replaced
-1:000000000000 0:7f656887cf89
       
     1 # source.cif
       
     2 # 
       
     3 # Copyright (c) 2010 Accenture. All rights reserved.
       
     4 # This component and the accompanying materials are made available
       
     5 # under the terms of the "Eclipse Public License v1.0"
       
     6 # which accompanies this distribution, and is available
       
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 # 
       
     9 # Initial Contributors:
       
    10 # Accenture - Initial contribution
       
    11 #
       
    12 
       
    13 ==name source
       
    14 
       
    15 ==short-description
       
    16 
       
    17 Run the specified script in the context of the current L<fshell|fshell> instance.
       
    18 
       
    19 ==long-description
       
    20 
       
    21 The main reasons for using this command are:
       
    22 
       
    23 =over 5
       
    24 
       
    25 =item *
       
    26 
       
    27 To avoid the overhead of creating a separate fshell process in which to run a script.
       
    28 
       
    29 =item *
       
    30 
       
    31 To allow the environment variables of the executing fshell instance to be updated by a script.
       
    32 
       
    33 =back
       
    34 
       
    35 Note, fshell defines an environment variable named C<SCRIPT_PATH> that contains the full path to the script that is currently executing. This can be used to make scripts independent of their file system location, for example:
       
    36 
       
    37   source $SCRIPT_PATH\some.script
       
    38 
       
    39 ==see-also
       
    40 
       
    41 L<debug|debug>
       
    42 
       
    43 ==argument filename script_file_name
       
    44 
       
    45 The name of the script file to be run.
       
    46 
       
    47 ==argument string script_args optional last
       
    48 
       
    49 The arguments to pass to the script.
       
    50 
       
    51 ==option bool k keep-going
       
    52 
       
    53 Keep processing the script even if a previous command has returned an error. Without this option set, an error would cause script processing to abort (and the source command to exit with the error code) unless either C<&&>, C<||> or C<&|> was used to handle the error.
       
    54 
       
    55 ==copyright
       
    56 
       
    57 Copyright (c) 2006-2010 Accenture. All rights reserved.
       
    58