home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sun4nl!orcenl!nl.oracle.com!cmylod
- From: cmylod@nl.oracle.com (Colum Mylod)
- Newsgroups: comp.unix.shell
- Subject: Re: csh/ksh comparison questions?
- Message-ID: <2530@nlsun1.oracle.nl>
- Date: 22 Jul 92 14:53:00 GMT
- References: <1992Jul21.183727.20364@gmuvax2.gmu.edu> <tim.711812407@mal-s1>
- Sender: news@nl.oracle.com
- Organization: Oracle Europe
- Lines: 24
- Nntp-Posting-Host: nltar2
-
- In article <tim.711812407@mal-s1>, tim@mal-s1.gatech.edu (Tim Shelling) writes:
- |> >1) set filec or file completion
- |> On the command line, go into the vi-editing mode (I don't know how to do
- |> this in emacs mode), and place the cursor on the name of the file you want to
- |> expand. Hit '*' which will expand the current filename as if '*' were
- |> appended to it. Or hit '\' and the current word will be replaced with
- |> "the longest common prefix of all filenames matching the current word with
- |> an asterik appended." There's a bunch of other nifty things... These features
- |> are present in BASH also.
- In emacs mode it's all ESC. To list matching filenames/directories but not
- complete the current name type ESC=. The emacs equivalent of vi-mode * is
- ESC ESC.
-
- |> >2) concurrent sessions inadvertently use the same history
- |> > file. Appending a pid to the history file at login may help
- |> > but there is no logout facility to remove the file.
- |> With KSH you can trap signals and execute programs on reception of
- |> those signals. I've seen someone trap the EXIT
- |> signal (or something like that) and have it run a shell, which
- |> did exactly that -- it removed a process-dependent sh-history file.
- To aviod crashes & untrapped logoffs building up a trail of history files
- it's easier to use the tty as part of the HISTFILE name instead of the pid.
- An example is HISTFILE=/where/ever/home/is/.hist_`tty | cut -c8-`
- (for machines with ttys like /dev/pts001).
-