dundalek / closh

Bash-like shell based on Clojure
Eclipse Public License 1.0
1.61k stars 65 forks source link

Lifecycle hooks #117

Open dundalek opened 5 years ago

dundalek commented 5 years ago

From a discussion in reddit:

Yes! Hook everything! There really cannot be too many hooks. Because of this, I think there should be a naming convention and/or namespace for them. Consider implementing the hook as a list of functions rather than just a single function. That will facilitate things like plugins, so multiple plugins can add hooks without monkey patching.

Naming ideas (in order of my decreasing preference):

Ideas for hooks include but are very much not limited to:

LeaveNhA commented 4 years ago

I'm here with a simple search in issues plugin. The idea of Plugins is awesome on Closh.

Are there implementation attempt on these ?

dundalek commented 4 years ago

I did not think about the design much yet. But I wonder if we could leverage some 3rd party library for that, something maybe like hooke.