[Tcsh] history for combined catch

Christos Zoulas christos at zoulas.com
Mon Feb 10 13:09:14 UTC 2020


We can fix the documentation then.

christos

> On Feb 10, 2020, at 8:02 AM, H.Merijn Brand <h.m.brand at xs4all.nl> wrote:
> 
> Signed PGP part
> On Sat, 8 Feb 2020 11:39:40 -0500, Christos Zoulas
> <christos at zoulas.com <mailto:christos at zoulas.com>> wrote:
> 
>> There is histlit for that... (to print the actual input line).
> 
> I know that one. I was wondering about the inconsistency between the
> docs and the default expansion.
> 
> Reading the docs I would *not* expect the space
> 
>> christos
>> 
>>> On Jan 31, 2020, at 4:41 AM, H.Merijn Brand <h.m.brand at xs4all.nl>
>>> wrote:
>>> 
>>> Signed PGP part
>>> I use >& >>& and |& on a regular basis. very regular :)
>>> 
>>> The docs refer to these like:
>>> 
>>>> name
>>>> ! name
>>>> & name
>>>> &! name
>>>              The file name is used as standard output.  If the
>>> file does not exist  then it is created; if the file exists, it is
>>> truncated, its previous contents being lost.
>>> 
>>>              If the shell variable noclobber is set, then the file
>>> must  not exist  or  be  a  character  special  file (e.g., a
>>> terminal or `/dev/null') or an error results.  This helps prevent
>>> acciden- tal  destruction  of  files.  In this case the `!' forms
>>> can be used to suppress this check.  If notempty is given  in
>>> noclob- ber,  `>'  is  allowed  on  empty  files;  if  ask  is
>>> set, an interacive confirmation is presented, rather than an error.
>>> 
>>>              The forms involving `&' route the diagnostic  output
>>> into  the specified  file  as  well  as  the  standard  output.
>>> name is expanded in the same way as `<' input filenames are.
>> [...]
>>>              Like `>', but appends output to the end of name.  If
>>> the  shell variable noclobber is set, then it is an error for the
>>> file not to exist, unless one of the `!' forms is given.
>>> 
>>>      :
>>> 
>>>      Diagnostic output may be directed through a pipe with the
>>> standard out- put.  Simply use the form `|&' rather than just `|'.
>>> 
>>> Note there is no space between the '>' or '|' and the '&'
>>> 
>>> But in the history, these are store separated by a space :(
>>> 
>>> % echo Foo >& /dev/null
>>> % echo Foo |& cat > /dev/null
>>> % echo Foo >>& /dev/null
>>> % history 4
>>>  502 01-31 10:37:20  echo Foo > & /dev/null
>>>  503 01-31 10:37:33  echo Foo | & cat > /dev/null
>>>  504 01-31 10:37:41  echo Foo >> & /dev/null
>>>  505 01-31 10:37:46  history 4
>>> 
>>> Not that it causes problems, but I find it confusing and it makes
>>> repeating commands and editing more complex. At least in my brain
>>> 
>>> Is there a (good) reason to add the unneeded space into the
>>> history?
> 
> 
> --
> H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
> using perl5.00307 .. 5.31      porting perl5 on HP-UX, AIX, and Linux
> https://useplaintext.email  https://tux.nl  http://www.test-smoke.org
> http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/
> 
> <sanitizer.log>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.astron.com/pipermail/tcsh/attachments/20200210/65defae9/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <https://mailman.astron.com/pipermail/tcsh/attachments/20200210/65defae9/attachment.asc>


More information about the Tcsh mailing list