Re: Switching from tcsh to bash as an interactive shell
From: Chris F.A. Johnson (cfajohnson_at_gmail.com)
Date: 09/18/04
- Next message: Chris F.A. Johnson: "Re: OneFinger - the graphical shell"
- Previous message: P.T. Breuer: "Re: autoconf - automake"
- In reply to: P.T. Breuer: "Re: Switching from tcsh to bash as an interactive shell"
- Next in thread: P.T. Breuer: "Re: Switching from tcsh to bash as an interactive shell"
- Reply: P.T. Breuer: "Re: Switching from tcsh to bash as an interactive shell"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 18 Sep 2004 08:15:41 GMT
On 2004-09-18, P.T. Breuer wrote:
> Bruce Barnett <spamhater103+U040917203506@grymoire.com> wrote:
>> ptb@oboe.it.uc3m.es (P.T. Breuer) writes:
>
>> > Indeed it is - it's called interpreting, and it makes debugging (small
>> > things) easy. However, that's not the "command line", that's an
>> > interpreter, and I encourage you to use it.
>
>> There is no reason to write a script if you are going to use it once,
>> and don't need to debug it.
>
> The idea of programming is that you do not continue to write and
> rewrite the same program. I have written programs (i.e. things of
> twenty lines or so) that I have used only once, but only very very
> rarely. Normally I would embed my effort in a permanent piece of text,
> for reuse.
[snip]
> Nor would I want to! I switch to sh if I want to program. Why do you
> pusue these ridiculous red herrings? Can you really not get the idea?
As you say, "I switch to sh if I want to program." Well, I want
to program, and everything I type at the command line is a
program; that's why I don't use tcsh. I don't want to have to go
into an editor every time I need a one-time, two- to five-line
program.
All the commands I type at the command line are stored in the
history. If I want to find a previous command, I use Ctl-R or
Ctl-Up (reverse-search-history or history-search-backward),
depending whether or not the command started with the word I am
searching for. It's vastly easier than searching through the
thousands of command files I would have otherwise.
When the history file gets too big, it is automatically backed up.
I have a directory of old history files that I can also search for
old commands.
When a program becomes too complex for use at the command line,
but I don't think it warrants its own file, I have a catch-all
script file. I insert the new program at the beginning, followed
by a dated separator (a macro does the insertion):
exit
##
## 2004/09/17 22:00:00
##################################################################
The ability to enter a multi-line command is such a time saver
that another shell would have to have some incredible features to
make up for the lack of it.
When I started using Unix, only sh and csh were available. After a
couple of weeks, I tried csh. The lack of multi-line capabilities
sent me running straight back to sh.
Would I have gone back to sh if it had been tcsh instead of csh? I
honestly don't know. I had been using a shell with history and
command-line editing for a few years by that time (it didn't have
multi-line entry, and it was nowhere near as powerful as sh), so
it would have been a more difficult choice. I think the multi-line
entry would have won out.
--
Chris F.A. Johnson http://cfaj.freeshell.org/shell
===================================================================
My code (if any) in this post is copyright 2004, Chris F.A. Johnson
and may be copied under the terms of the GNU General Public License
- Next message: Chris F.A. Johnson: "Re: OneFinger - the graphical shell"
- Previous message: P.T. Breuer: "Re: autoconf - automake"
- In reply to: P.T. Breuer: "Re: Switching from tcsh to bash as an interactive shell"
- Next in thread: P.T. Breuer: "Re: Switching from tcsh to bash as an interactive shell"
- Reply: P.T. Breuer: "Re: Switching from tcsh to bash as an interactive shell"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|