zsh-workers
 help / color / mirror / code / Atom feed
* preexec problems
@ 2015-06-22  5:53 Dave Yost
  2015-06-22  6:00 ` Mikael Magnusson
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Yost @ 2015-06-22  5:53 UTC (permalink / raw)
  To: zsh workers

[-- Attachment #1: Type: text/plain, Size: 873 bytes --]

It occurred to me that using the preexec hook, I could get the command line to be in another color.

However, there are some bugs. The white command line characters below come about from using tab completion.

0 Sun 22:48:55 yost DaveBook ~
203 Z% cd /tmp
0 Sun 22:49:02 yost DaveBook /tmp
204 Z% mkdir -p  a/b/c/d
0 Sun 22:49:10 yost DaveBook /tmp
205 Z% ls a/b/c/d 
0 Sun 22:49:17 yost DaveBook /tmp
206 Z% 

0 Sun 22:50:55 yost DaveBook /tmp/a
210 Z% mkdir 1 2 3 4 5 6
0 Sun 22:51:06 yost DaveBook /tmp/a
211 Z% ls         ls
1/  2/  3/  4/  5/  6/  b/

This last problem was from typing “ls” and then tab. And it gets worse if you try to backspace.

Here is an easy way to reproduce this:

Z% PS1="$PS1%B"                         
Z% function preexec { echo -n '\e[39m' }
Z% echo yea
yea
Z% ls a/b/c/d 
Z% ls a/b/c 
d
Z%         



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-23  3:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-22  5:53 preexec problems Dave Yost
2015-06-22  6:00 ` Mikael Magnusson
2015-06-23  3:55   ` Dave Yost

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).