* 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
any interface which has lua side objects that are from go side for its api (namely jobs) they will use userdata instead of always creating a table to represent the object. this might or might not bring lower ram usage since there is now only 1 single reference to an object instead of always creating a table to expose on lua
breaking change since methods need to be called with a colon instead of dot
this is going to be a middle level interface
which brings functions for interacting
with the line editor used in hilbish
adds the following functions:
setVimRegister(reg, text) - sets text in a vim register
getVimRegister(reg) - gets text from a vim register
insert(text) - inserts text into the line
accessible via hilbish.editor
this also makes the completion functions `bins`
and `files` also return the prefix to pass
to the completion handler.
this is an overhaul to the completion system,
which gets the completion handler from lua
instead of being made to only have lua provided
*command* completions.
it does not have any performance deficit, even
though it calls in to golua for completions.
with the change of blocking changes to the
hilbish table, i took an opportunity
to make the highlighter and hinter callbacks
set in a more natural way. instead of being
a function which takes a callback, you set
the function itself.
changed the way file completions are handed
completely, which fixes#130 and makes the
full name appear in the completion menu instead
of it being cut off
* feat: add right prompt (closes#111)
* chore: add comment for set right prompt function
* fix: add 1 space at the end of right prompt to fix character cut off
* docs: update doc for prompt function
adds a map (but lets call it a pool) of all
running timers. this makes us able to keep
track of all running intervals and timeouts.
it also means hilbish can wait for them to
be done before exiting (it only waits when
non interactive).
this introduces the `hilbish.timers` interface,
documented by `doc timers`. the `hilbish.interval`
and `hilbish.timeout` functions return a timer
object now.
major rewrite which changes the library hilbish uses for it's lua vm
this one implements lua 5.4, and since that's a major version bump,
it's a breaking change. introduced here also is a fix for `hilbish.login`
not being the right value
* refactor: start work on lua 5.4
lots of commented out code
ive found a go lua library which implements lua 5.4
and found an opportunity to start working on it.
this commit basically removes everything and just leaves
enough for the shell to be "usable" and able to start.
there are no builtins or libraries (besides the `hilbish` global)
* fix: call cont next in prompt function
this continues execution of lua, very obvious
fixes an issue with code stopping at the prompt function
* fix: handle errors in user config
* fix: handle panic in lua input if it is incorrect
* feat: implement bait
* refactor: use util funcs to run lua where possible
* refactor: move arg handle function to util
* feat: implement commander
* feat: implement fs
* feat: add hilbish module functions used by prelude
* chore: use custom fork of golua
* fix: make sure args to setenv are strings in prelude
* feat: implement completions
* chore: remove comment
* feat: implement terminal
* feat: implement hilbish.interval
* chore: update lunacolors
* chore: update golua
* feat: implement aliases
* feat: add input mode
* feat: implement runner mode
* style: use comma separated cases instead of fallthrough
* feat: implement syntax highlight and hints
* chore: add comments to document util functions
* chore: fix dofile comment doc
* refactor: make loader functions for go modules unexported
* feat: implement job management
* feat: add hilbish properties
* feat: implement all hilbish module functions
* feat: implement history interface
* feat: add completion interface
* feat: add module description docs
* feat: implement os interface
* refactor: use hlalias for add function in hilbish.alias interface
* feat: make it so hilbish.run can return command output
* fix: set hilbish.exitCode to last command exit code
* fix(ansikit): flush on io.write
* fix: deregister commander if return isnt number
* feat: run script when provided path
* fix: read file manually in DoFile to avoid shebang
* chore: add comment for reason of unreading byte
* fix: remove prelude error printing
* fix: add names at chunk load for context in errors
* fix: add newline at the beginning of file buffer when there is shebang
this makes the line count in error messages line up properly
* fix: remove extra newline after error
this is a pretty big commit which mainly contains a refactor
and breaking change to how command completions are done.
before that, a hilbish.completion interface has been added
which for now just has 2 functions (`files` and `bins`)
for completions of normal files and executables.
hilbish.complete is now expected to return a table of
"completions groups," which are as the name suggests a group
for a completion. a completion group is a table which has
the fields `type`, which can be either `list` or `grid`,
and `items`, being an array (or string keyed table) of items
if an item is string keyed the item itself is the key name
and the value is a table with the first value in it being the
description for the item. this description is only applied
with the list type.
this is probably the longest commit message ive written