From: Scott Smedley <scottie@yoyo.cc.monash.edu.au>
To: zsh-users@sunsite.auc.dk
Subject: esc seq in prompt
Date: Thu, 13 Jul 100 11:07:36 +1000 (EST) [thread overview]
Message-ID: <200007130107.LAA449963@yoyo.cc.monash.edu.au> (raw)
Hi,
I'm having a small trouble with the command-line completion
system when I have escape sequences in my PROMPT environment variable.
Basically, the cursor jumps to the right of screen (spaces are
inserted?) & confuses the hell out of mE when I hit TAB in a
directory & get multiple matches.
Below is a copy of the *entire* .zshrc file I'm using to try &
debug this. I'd love some help or a pointer to get around this.
burns>> echo $ZSH_VERSION
3.1.9-dev-1
burns>> uname -a
Linux burns 2.2.12-20 #1 Mon Sep 27 10:40:35 EDT 1999 i686 unknown
=== cut: .zshrc ===
setPrompt ()
{
rv=$?
local red green white errno color1 color2
red=`print -nP '\e[\033[31;;1m'`
green=`print -nP '\e[\033[32;;1m'`
white=`print -nP '\e[\033[37;;1m'`
errno=""
if [ $rv = 0 ] ; then
color1=$green
color2=$green
else
color2=$red
if [ $rv = 1 ] ; then
color1=$green
else
color1=$red
if [ $rv != 2 ] ; then
errno="($rv)"
fi
fi
fi
export PROMPT=$green$MACHINE$color1$errno">"$color2"> "$white
}
export MACHINE=`uname -n`
precmd ()
{
setPrompt
}
=== end: .zshrc ===
SCoTT! :)
--------------------
scott@mobinfo.com.au
next reply other threads:[~2000-07-13 0:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-07-13 1:07 Scott Smedley [this message]
2000-07-13 1:43 ` Zefram
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200007130107.LAA449963@yoyo.cc.monash.edu.au \
--to=scottie@yoyo.cc.monash.edu.au \
--cc=zsh-users@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).