Loading ...
Sorry, an error occurred while loading the content.

3689Re: Heuristic Script Building (was: Re: [hackers-il] enhancing the 'Unix IDE')

Expand Messages
  • Tzafrir Cohen
    Apr 29, 2004
      On Thu, Apr 29, 2004 at 02:16:58AM +0300, Omer Zak wrote:
      > Hello Guy,
      > Your idea is very right approach to extremely high productivity in
      > computer use and software development.
      > I'd like to suggest another approach, of which I thought a lot of time
      > ago, but didn't get around to implement:
      > Augment a shell (such as bash), so that its history will be available to
      > an external process to analyze. The external process is to be able also
      > to inject commands (and enjoy some of the shell's services such as tilde
      > expansion, filename completion, etc.).
      > The external process which I have in mind will identify, over a long
      > time, patterns of repeating commands (also inside applications, if it
      > knows also to listen to X-Window/KDE/Gnome events).
      > It will then invoke heuristic methods to automatically construct macros.
      > The user will then be able to edit, polish, give names and document the
      > macros which he finds to be most useful.
      > Then, whenever the user needs to perform again a frequently-occurring
      > operation, he'll select the macro from a menu provided by the external
      > process. A dialog will allow the user to enter any required parameters.

      That's what a shell history is for.

      Searching in it using ctrl-r is very useful.

      BTW: I occasionally automate shell commands in a project using a
      makefile. This allows me to script a complicated process and allows me
      to run each step separately. Another atvantage of make: good control
      over built-in variables.

      Each makefile step should ideally contain only one command. This means
      that in case a long command succeds but a subsequent short command
      fails, you won't have to run that long command again.

      If the command is a "logical" target, or produces something that is nor
      under the current dorectory, "touch $@" in the end of that target is

      Tzafrir Cohen +---------------------------+
      http://www.technion.ac.il/~tzafrir/ |vim is a mutt's best friend|
      mailto:tzafrir@... +---------------------------+
    • Show all 15 messages in this topic