home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / shell / 3084 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  1.8 KB

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