[Tcsh] ls prints 0m if xterm title is set via jobcmd
Eduardo Alvarez
ealvarez at fastmail.com
Wed Sep 18 00:34:15 UTC 2019
Hello, list,
I've noticed the following unexpected behavior when using escape sequences to
write the current job to the terminal title.
I've got the following aliases set up:
alias ls 'ls --color=auto -F'
alias jobcmd 'echo -n "\033]2;\!#:q\007"'
The second alias is copied almost verbatim from the tcsh man page. The only
change has been to no escaped the semicolon after the number 2, as including it
results in printing "; man man" right before the prompt is printed. Removing it
prints the job to the xterm title, as desired. But I digress.
When I use `ls`, as aliased above, the string "0m" is printed before the first
file in the directory. I've found that replacing the system's ls by the builtin
ls-F solves the issue, but I'm curious as to what might be happening.
Note that I'm using GNU's ls, as is standard in linux operating systems.
Thanks in advance for any insight.
Regards,
Eduardo Alvarez
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/tcsh/attachments/20190917/abcbbf89/attachment.asc>
More information about the Tcsh
mailing list