[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new features to GNU Bash
From: |
Chet Ramey |
Subject: |
Re: new features to GNU Bash |
Date: |
Wed, 16 Jun 2010 12:04:21 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1 |
On 6/14/10 6:45 AM, mika.p.makinen@webinfo.fi wrote:
> Hello,
> I suppose I have found a new feature to Bash.
> If user needs to rename a file and the file is in directory
> /home/user/a/b/c/d/e/file,
> user needs to write command mv /home/user/a/b/c/d/e/file
> /home/user/a/b/c/d/e/fileB.
> This command contains the directory written two times. so if Bash would
> remember
> directory, it would be possible to retrieve directory from memory the second
> time it is
> needed.
> That way user does not need to rewrite the same long directory again. there
> should
> be a key combination to retrieve the directory from memory to command line.
There is, but you have to save it yourself. If you're using emacs editing
mode, you can use ^W to save the first pathname, and ^Y to retrieve it.
> I also have three other feature propositions.
>
> a)
>
> In Bash scripts (and more generally in any programming language), there could
> be
> a feature, which, when user presses F1 in place of a source code line, would
> tell
> in plain English what the source code line does. that would be useful for
> those who
> are learning new programming language and need to know what a source code
> does.
> also hard-to-find typos would be revealed this way.
There are tools that already do part of this -- syntax-directed editors,
for instance. The command-to-English-explanation system is a really
daunting task.
The other two proposals don't belong in bash.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/