Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!snorkelwacker!apple!bionet!ames!amdcad!sun!ravi!anantha From: anantha%ravi@Sun.COM (Anantha Srirama) Newsgroups: gnu.bash.bug Subject: readline enhancement request Keywords: bash 1.04 readline enhancement Message-ID: <130059@sun.Eng.Sun.COM> Date: 10 Jan 90 01:01:45 GMT Sender: news@sun.Eng.Sun.COM Distribution: usa Lines: 44 I have been using bash (1.04) for a couple of months and am happy with its performance. I was a Korner before I was a Basher :-) for the sake of history and it explains the following as well: - When KSH is in EMACS editing mode one can yank the last argument of the previous command, a la !$ in BASH or CSH, and insert it in the present command line. This is done physically, meaning the last argument of the previous command line appears when you type _ This is a nice feature which is notably absent in bash-1.04. Bash naively assumes that the only things one wants to do with the last argument of the previous command is to reuse it, which is not the case many times. Many a times I yank this argument and tweek it. - KSH provides a wide array of utilities to manipulate the value of variables as follows: ${param#pattern} -> remove small left pattern from 'param' ${param##pattern} -> remove large left pattern from 'param' ${param%pattern} -> remove small right pattern from 'param' ${param%%pattern} -> remove large right pattern from 'param' These are very useful utilities that I use a lot in shell scripts which rename, unshar... a group of files ksh$ for i in part?.Z ksh> do ksh> uncompress $i > ${i%.Z} ksh> done The above script in KSH puts all the uncompressed files in 'part?' I don't know how one would do it in bash-1.04?? If any of this can be done bash, then can somebody please tell me how. If not the implementor (Brian Fox are you listening :->) might want spend a few minutes thinking about this. Thanks for a great FREE shell. -Anantha- ******************************************************************************* Anantha Padmanabha N. Srirama | USENET: ...sun!anantha@Eng Sun Microsystems | ARPA: anantha@Eng.Sun.COM 2550, Garcia Ave. MS: 16-02 | Mt. View, CA-94043 | *******************************************************************************