Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!tut.cis.ohio-state.edu!melba.bby.oz.au!gnb From: gnb@melba.bby.oz.au (Gregory Bond) Newsgroups: gnu.bash.bug Subject: Some minor bash nits/wouldlikes Message-ID: <8909010622.AA04478@baby.bby.oz> Date: 1 Sep 89 06:22:08 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 54 Coming from a (SunOS 3.5) csh environment, there are a few things I'd really like to see in bash: For history, a few inconsistancies: There is no :gs operator for replacing on the whole line. e.g. % echo hello hello hello hello % !!:gs/ll/xdr/ echo hexdro hexdro hexdro hexdro And the existing :s operator doesn't do delimiter-escaping or &-expanding. e.g. % echo qweryuiop qweryuiop % !!:s/qwer/&t echo qwertyuiop qwertyuiop % echo hello/world hello/world % !!:s/llo\/wo/ll0\/wo/ echo hell0/world hell0/world Fixing this would require some rewrite of the :s processing in history.c. I am intending to look at this at some point soon. Is there some philosophical reason why this is a bad idea (e.g. a decision that the csh history mechanism is in some sense flawed)? 2) When starting window tools in the background, they inherit the tty state from bash and use that for the command window. (The tool I notice this from is Sun's dbxtool). This leaves the dbxtool command window in cbreak/noecho mode. Most annoying. And you can't start it in foreground and then ^Z it as dbxtool ignores ^z. Dammit. I guess this is in general impossible to ensure, because you can never tell when the background task has read the tty state and thus it is safe to reset it. Just put it down to broken dbxtool. Should be documented pretty clearly in the eventual manual. 3) Sun csh does completion on ~u for usernames. A useful feature I may add one day. 4) Sun csh, when given a "cd dir1" will try current dir, then cdpath, then a shell/environment variable called "dir1". I've found this really usefull for working on multiple versions of the one source: a command can set shell variables for make, etc, and vars for src, run, lib etc. Then "cd run" changes to the correct run directory. Again, should be easy to add. The sun version didn't know about paths, so perhaps you could make "cd dir1/dir2" equivalent to "cd $dir1/dir2". Greg.