my absolutely terrible april fools release was made on a separate branch. this pr merges the fixes on master so history can be synced up. (and mainly to get the 2.1.2 blog post)
* feat: add read method to sinks
* feat: add manual flush method for sinks
* fix: add flush as sink method and fix arg amount for read
* feat: add pipe property to sinks to see if stdin sink is a pipe
* feat: add method autoFlush to toggle/change automatic flushing
* chore: update changelog
to write output, you would usually just use the print builtin
since commanders are just lua custom commands but this does not
consider the fact of pipes or other shell operators being used
to redirect or whatever.
this adds readable/writable "sinks" which is a type for input
or output and is currently only used for commanders but can be
used for other hilbish things in the future
fixes an issue of going up and down in history results in the incorrect order of commands being inserted (nothing happens to the order in the history itself, just when navigating via arrow keys)
* fix: provide correct command when navigating history
previously, the order while navigating history
with the arrow keys would be incorrect
meaning the command you expect if you go u
then go back down would not be there
* chore: update changelog
* refactor: use custom event emitter
* fix: sigint hook emit on windows
* fix: restore correct hilbish conf file
* fix: call recoverer for go listeners
* refactor(golibs/bait): use 1 map for listeners
* feat: add once listeners, ability to remove listeners and remove listener on error
* perf: reslice listener slice instead of trying to do ordered move with append
* feat(bait): add release function to remove event listener
* perf: remove listener directly from once emit instead of using off function
* refactor: use bait event emitter on commander
* docs(golibs/bait): add doc strings for functions
* docs: set changelog
* docs(golibs/bait): add docs for lua release function