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

Re: zsh tips for "UNIX Power Tools"



On Mar 4,  1:05pm, Thomas Köhler wrote:
} Subject: Re: zsh tips for "UNIX Power Tools"
}
} Of course [...]

I put in a lot of extra details for Jerry's benefit.

} > 	# requires setopt prompt_subst
} > 	PROMPT="$PROMPT"'%{$(show_mode INSERT >/dev/tty)%}'
} > 
} > Now the prompt itself runs the initial show_mode, and you don't need any
} > background jobs run from precmd.
} 
} Well, OK so far - but the indication still ends up in the wrong place

show_mode is a function; fiddle with it.  E.g. pass the number of lines
to move up as a second argument, or pass that second argument only when
in the prompt and don't move up a line when $# > 1, or ...

} One last thing: Bart, thanks for your cool and incredible tips on this
} list. I learned much from you!

My pleasure.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author