home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / shell / 3220 < prev    next >
Encoding:
Text File  |  1992-07-30  |  3.3 KB  |  78 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!mcsun!sunic!ugle.unit.no!news
  3. From: Harald.Eikrem@delab.sintef.no
  4. Subject: Re: tcsh in the future - what should it be like?
  5. In-Reply-To: smr@iti.org's message of 29 Jul 92 14:12:10 GMT
  6. Message-ID: <1992Jul31.010903*Harald.Eikrem@delab.sintef.no>
  7. Sender: news@ugle.unit.no (NetNews Administrator)
  8. Organization: SINTEF DELAB, Trondheim, Norway.
  9. References: <yeates.711122638@beryl17> <1992Jul16.153506.24366@bmerh85.bnr.ca>
  10.     <1992Jul27.031238.10376@chpc.utexas.edu>
  11.     <1992Jul27.215202*Harald.Eikrem@delab.sintef.no>
  12.     <smr.712419130@hitkw14>
  13. Date: 31 Jul 92 01:09:03
  14. Lines: 62
  15.  
  16. ! >! I'd like to see a history mechanism that works like VMS' RECALL, i.e. 
  17. ! >! type something like !vi .cs  and get the last vi command that edits 
  18. ! >! .cshrc.  Simple, powerful concept; only a single command to learn. 
  19. ! >It's there.  You just need to try.
  20. ! care to enlighten us?? or are you still telling failed entrepreneurs
  21. ! that there is a pot of gold at the end of every rainbow?
  22.  
  23. You're absolutely right.  Like in csh, a history match (event) string does
  24. not span over spaces, and definitely shouldn't ('you know why?).  One may
  25. probably wish that the case where the history expansion appears absolutely
  26. first on a command line, and where it is the sole one on the entire line,
  27. for practical reasons be treated almost like a combination of a history-
  28. search-backward and implicit newline.
  29.  
  30. However, I dont really see the wonderful reasons to deviate from csh on
  31. this, since there are so many other powerful consepts in tcsh which you
  32. should rather learn.  If you find it so extremely hard to get rid of
  33. antique csh habits, then what's the point...   Csh history substitution is
  34. NOT really a *command* in itself, it is a feature that may appear in multi-
  35. ple instances on a command line.
  36.  
  37. However, there is one other case where spaces in a history match does make
  38. sense, i.e. !?aaa bbb ccc?, it doesn't work, probably because the old csh
  39. matching algoritms are so primitive.
  40.  
  41. ! >! Also, the history list should save a command only if it is different 
  42. ! >! from the last one.
  43. ! >No way.  You will be able to reach the next *different* command in the
  44. ! DISAGREE!
  45. ! if you are developing something, and you get into a debug mode, the
  46. ! usual sequence of commands goes something like:
  47. !     edit
  48. !     compile
  49. !     run ( or debug )
  50. !     edit
  51. !     compile
  52. !     ... ( ad infinitum )
  53. ! if after doing this 30 times, the last 100 entries in your history are
  54. ! the same three commands over and over, what if you then want to do
  55.  
  56. Have you ever seen a windowing environment?
  57.  
  58. ! Also, I would really love a 'merge_histories' feature, this is relevant
  59. ! only if you have many tcsh's running at the same time, because when I
  60. ! quit my XWindows session, by dumb luck or whatever, the last tcsh to
  61.           ^^^^^^^^^^^^^^^^somehow answers the question above, I guess.....
  62.  
  63. ! save the history seems to be the one I used the least, with all the
  64. ! most boring, and least used commands in the history, any solutions?
  65. ! anyone come up with some sort of .logout hack?
  66.  
  67. No suggestions.  What exactly do you mean with "merge histories"?  I imagine
  68. the last 100 or so commands from 5-10 shells, intermixed, but will it ever
  69. constitute interesting stuff?  Oh sure, you might want to use it for
  70. documentational purposes........:)
  71.  
  72.   ~~harald E.
  73.