diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-09-10 07:09:01 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-09-10 07:09:01 -0700 |
commit | a1fabcdbc8b307ea010da6f831b1a1addbf72ec2 (patch) | |
tree | 0316d37f6e43cafed8a21303f270e28c43ef319d /txr.1 | |
parent | cbf8c45bc7e737a849b62d4c2283aae11a3010e1 (diff) | |
download | txr-a1fabcdbc8b307ea010da6f831b1a1addbf72ec2.tar.gz txr-a1fabcdbc8b307ea010da6f831b1a1addbf72ec2.tar.bz2 txr-a1fabcdbc8b307ea010da6f831b1a1addbf72ec2.zip |
Bugfix: *args* not bound for command line expressions.
The documentation says that *args* is bound to nil,
but actually it is not bound at all.
Let us fix this by actualy binding *args* to the
remaining arguments, and by also allowing
modification of *args* to dynamically take effect.
* txr.c: Set up value of *args* prior to processing
any option which evaluates TXR Lisp. Afterwards,
reload the argument list from that variable.
* txr.1: Documented semantics of *args* during
command line processing.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 22 |
1 files changed, 14 insertions, 8 deletions
@@ -30397,16 +30397,22 @@ The variable holds the original, complete list of arguments passed from the operating system. -Note: the +The .code *args* -variable is -.code nil -during the processing of the command line, -so \*(TL expressions invoked using the -.code -p -or +variable is available to to \*(TL expressions invoked from the +command line via the +.codn -p , .code -e -option cannot use it. +and other such options. During these evaluations, +.code *args* +holds all the remaining options, after the invoking option and its +argument expression. In other words, code executed from the command line +has access to the remaining arguments which follow it. +Furthermore, this code may modify the value of +.codn *args* . +Such a modification is visible to the option processing code. +That is to say code executed from the command line can rewrite the remaining +list of arguments, and that list takes effect. .coNP Function @ env .synb |