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

couple of zsh features



Fellow zsh hackers,

I was talking to a friend about shells the other night when the 
discussion of a couple of neat features came up.  There are a couple 
of features which we both thought could be very valuable and I'd like 
to know if anyone is working or has worked on them so I don't 
re-invent the wheel if I decide to delve into the source.

1) Right-hand command prompting.

   I know about RPS*, but how about a right-hand command prompt like 
so:

213 19:22                                                  <seven:~
213 19:22                                                 l<seven:~
213 19:22                                                ls<seven:~
213 19:22                                               ls <seven:~
213 19:22                                              ls -<seven:~
213 19:22                                             ls -l<seven:~

This shows how the line would progress as each command was typed.  
The stuff on the left is what I tend to keep in my prompt (history 
number and time).  I think this sort of "right justifying" could be a 
good visual clue for some people and help them set commands off from 
output.

2) `oops'

    Any of you ever used Infocom games or other interactive fiction?  
The construct is simple:

> get sord

?- What's a sord?

> oops sword

Taken.


In this example, it doesn't save you much work, but it can many other 
times.  What oops does is takes the first word that failed to parse 
correctly in the previous line and replaces it with its argument.  
Maybe some kind of compctl-based matching could be used to determine 
which word in the previous command was a likely mismatch.

Thoughts?

--
http://seven.ucs.indiana.edu/~mliggett |||        Matt Liggett       |
$_="5673089a34120b12c048de12f\n"; ///  |||   <mliggett@xxxxxxxxxxx>  |
@j=split//," erthJusanoPlck.";   ///   |||   '70 Midget '74 Bronco   |
s/./$j[hex $&]/ge;print         ///    |||       '78 Civic 1200      |




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