Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: If then Prompt
- X-seq: zsh-users 11512
- From: "Seth Kurtzberg" <seth@xxxxxxx>
- To: <zsh-users@xxxxxxxxxx>
- Subject: RE: If then Prompt
- Date: Fri, 25 May 2007 09:04:15 -0400
- In-reply-to: <011a01c79ec5$2525f920$6800000a@venti>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <fb3648c60705240913pedbd3afx957b60b804b33d1a@xxxxxxxxxxxxxx> <237967ef0705240918w6a923e7fk9e7f28164037715e@xxxxxxxxxxxxxx> <fb3648c60705240929i16bb6b3br260bb24b1192cde6@xxxxxxxxxxxxxx> <237967ef0705241011k61e67d42ic905efa86e7179f1@xxxxxxxxxxxxxx> <fb3648c60705241151q3a22e8c8i8f9e89fff77f5912@xxxxxxxxxxxxxx> <011a01c79ec5$2525f920$6800000a@venti>
- Thread-index: AceeyZ1rgi3xZKIWRjmQ2SuP46ZvEwAA11rQ
There are various ways to try to figure out what the user really has. Most
emulators have built in environment variables, or they allow you to define
your own in the client-side config, that you can look for on the server side
in *profile , if the server daemon supports the client setting arbitrary
variables which many don't. Plus if you hop from machine to machine or use
su to switch users, you lose the initial environment anyways. Then there is
answerback, where you send a \005 immediately followed by a timed read to
collect the answerback response, if the emulator supports it.
(present for ya, one line answerback that takes advantage of bash's timed
read option, using reads prompt to send the ^E and hiding the response from
going to the screen.)
[ -z "$MYTERM" ] && read -s -t 1 -p `echo -en "\005"` MYTERM # bash only
if I could just get rid of those backticks...maybe binary edit the script,
never tried...
use:
... $(echo -en "\005") ...
Messages sorted by:
Reverse Date,
Date,
Thread,
Author