Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!tut.cis.ohio-state.edu!AUREL.CALTECH.EDU!bfox From: bfox@AUREL.CALTECH.EDU (Brian Fox) Newsgroups: gnu.bash.bug Subject: Some minor bash nits/wouldlikes Message-ID: <8909011533.AA11301@aurel.caltech.edu> Date: 1 Sep 89 15:33:50 GMT References: <8909010622.AA04478@baby.bby.oz> Sender: daemon@tut.cis.ohio-state.edu Reply-To: bfox@aurel.caltech.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 76 I will be placing 1.03 on prep.ai.mit.edu today. Date: Fri, 01 Sep 89 16:22:08 +1000 From: Gregory Bond 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 That is right, I didn't write a `g'lobal operator. I may add one in the future. And the existing :s operator doesn't do delimiter-escaping or &-expanding. e.g. % echo qweryuiop qweryuiop % !!:s/qwer/&t echo qwertyuiop qwertyuiop THe ampersand is replaced by the matched text? What if you are just adding an ampersand, which seems to me to be a common case: bash$ hairy-function argument bash$ !!:s/argument/another-argument & <- user wants to background this job. % echo hello/world hello/world % !!:s/llo\/wo/ll0\/wo/ echo hell0/world hell0/world I didn't do delimiter escaping. However, the first character following the `:s' is the delimiter, so you can choose it when typing in the substitution request. For example: !!:s@llo/wo@ll0/wo would do what you wanted. 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 have fixed this (to the best of my knowledge) in 1.03. 3) Sun csh does completion on ~u for usernames. A useful feature I may add one day. It is in 1.03. 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". New variable in 1.03. "cdable_dirs", if it exists, says to do exactly that with arguments to pushd and cd. Brian