Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

RE: If then Prompt



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