Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: history idea



On Apr 27, 11:52pm, Frederik Eaton wrote:
}
} It is to add a mechanism to zsh so that when the shell executes a
} command, the command can communicate back to shell some lines which
} should be added to the end of the history.

This would be possible with a module.  The trouble is that it would
require that every command that wants to use it must also be modified
to perform the other end of the protocol.

A better (?) idea is similar to one the completion system already makes
use of:  Tell zsh how to parse the history files already maintained by
other apps, and add widgets (or configurations for a widget, e.g., the
completion functions) for pulling values from those files onto the zsh
command line.

That also avoids this problem:
 
} Of course, if you used such a feature, your history would become full
} of crap that you'd never care about. Navigating it with
} "{down,up}-line-or-history" after a long browser session would be
} impractical. You'd have to switch to using the history search
} commands.

Parsing the apps' own history files keeps each set of commands separate,
so that the true shell history doesn't get cluttered.



Messages sorted by: Reverse Date, Date, Thread, Author