Commit Graph

1114 Commits (a03f9f8dfdb0ba63f93661d64c4fedfdbe8739a0)

Author SHA1 Message Date
TorchedSammy 1febe66f84
fix(readline): use uniseg to calculate width of virtual tab entry (closes #209) 2022-11-17 19:18:57 -04:00
TorchedSammy 6ffcc498ac
docs: update changelog for rc 2022-10-14 19:25:18 -04:00
TorchedSammy fe47c6c7a1
chore: change version to rc1 2022-10-14 19:16:24 -04:00
sammy 0d32a10ca3
feat: add builtins clear, exec and cat (#208)
* feat: add clear and exec command

* docs: add builtins to changelog

* feat: add cat command
2022-10-14 19:15:40 -04:00
TorchedSammy cc6e5d01dd docs: [ci] generate new docs 2022-10-11 21:43:22 +00:00
TorchedSammy 068a5b5149
feat(bait): add error hook and hooks function (closes #205)
an `error` hook is now thrown when an event in lua
throws an error (errors from go side should not happen)
it includes the event name, handler, and error message

a hooks function has also been added. it returns a table
of handlers for a specific event.
2022-10-11 17:41:13 -04:00
TorchedSammy 117a4580b4
chore: merge from upstream master 2022-10-10 18:55:28 -04:00
TorchedSammy 0db7f96fd7
build: disable cgo in builds 2022-10-10 18:55:03 -04:00
TorchedSammy 300248de54 docs: [ci] generate new docs 2022-10-10 22:41:10 +00:00
TorchedSammy 3ee2b03330
feat: make prompt optional in hilbish.read 2022-10-10 18:40:29 -04:00
TorchedSammy 3bec2c91a8
fix: create an empty line reader instance for hilbish.read (closes #190) 2022-10-10 18:26:54 -04:00
TorchedSammy b4ca5bfda3
fix(readline): put cursor at end of text when exiting editor 2022-10-10 18:19:24 -04:00
TorchedSammy 308e257872
fix(readline): take into account newlines when calculating amount of lines taken up by input
this does not really fix the issue of multiline input
being broken completely, but prevents the prompt
being reprinted on input
2022-10-10 18:17:58 -04:00
TorchedSammy 7db2a2c826
fix: check if there is cmd input before attempting to add to history (closes #206) 2022-10-10 18:11:09 -04:00
TorchedSammy 22f6ea8a3e
docs: remove getting started from readme toc 2022-10-10 17:34:08 -04:00
TorchedSammy 91596fa81c
docs: document drop in windows support 2022-10-10 17:33:36 -04:00
TorchedSammy e5c8e5eaff
fix!: pass non expanded input to builtin runners
fixes an issue with expanded aliases being added
to history with a recent commit (6th time now with
this issue?) and makes behavior with other runners
consistent

this can technically be a breaking change to people
overriding the sh runner function
2022-09-17 21:00:28 -04:00
TorchedSammy 8647dc57a1
fix: set cmdString after prompting for continue input
makes sure that the old + new input is actually used for
builtin runners
2022-09-17 20:31:19 -04:00
TorchedSammy 8f41005da7
chore: update changelog 2022-09-17 20:24:31 -04:00
TorchedSammy 7108523a4c
fix: remove logging of autostart modules 2022-09-17 14:08:15 -04:00
TorchedSammy ee34ccdbc3
fix: check if key in _G is string before trying to getenv 2022-09-17 10:48:34 -04:00
TorchedSammy 959030f70d
refactor: automatically load all nature commands 2022-09-02 23:01:39 -04:00
TorchedSammy 59cec0ffa5
fix: call hinter for hint text handler 2022-09-02 22:19:30 -04:00
TorchedSammy 1eed4cc7ee
fix: add back empty string in command line split
this fixes file completion in normal usage without
using quotes. it basically cut out the space at the
end which prevented normal usage without adding an
additional space or using quotes for file
completion
2022-08-30 23:38:46 -04:00
TorchedSammy c13889592f
fix: pass alias expanded string to sh runner (fixes #201)
i have no idea why it didnt before, it *shouldnt*
introduce any problems and fixes this one.
2022-08-30 23:10:47 -04:00
TorchedSammy 2e192be2e1
refactor: setup autocd opt in a better way
with the previous commit allowing users to override
hilbish.runner.sh and it being ran by hilbish, the
code for the autocd opt can just override that
function and do the autocd functionality instead
of reimplementing a hybrid runner.

this means that if any other custom runner wants
autocd functionality they can have it with the sh runner
2022-08-30 23:08:22 -04:00
TorchedSammy c96605e79c
feat: allow hilbish.runner.sh to be overridden 2022-08-30 23:07:24 -04:00
TorchedSammy a1ce2ecba6
fix(readline): correct function to count len of prompt to accomodate east asian characters 2022-08-30 22:37:21 -04:00
TorchedSammy a1410ae7ad
fix: set prompt to normal after ctrl d exit
this prevents the prompt being stuck at the multiline
prompt instead of normal prompt after exiting
via the ctrl d bind
2022-08-30 21:52:07 -04:00
TorchedSammy 20870b9004
fix: only print motd when interactive 2022-08-17 18:05:20 -04:00
TorchedSammy 3dcd99563a docs: [ci] generate new docs 2022-08-17 22:01:55 +00:00
sammy 2337f9ab60
refactor: use custom event emitter (#193)
* 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
2022-08-17 18:01:32 -04:00
TorchedSammy 6ce4fb3973
fix: add dot to sample config path on windows 2022-08-16 12:30:39 -04:00
TorchedSammy 387d7d2243
fix: percentages in completion entries causing a problem in the completion menus 2022-07-26 19:24:02 -04:00
TorchedSammy 7de835fab4
chore: update lunacolors (adds blackBg format arg) 2022-07-26 10:41:12 -04:00
TorchedSammy 3e0a2d630b
feat(hilbish.editor): add getLine function to get contents of line 2022-07-19 17:55:03 -04:00
TorchedSammy 09a8b41063
chore!: remove guide command (closes #188) 2022-07-13 16:04:57 -04:00
sammy 349380ae6b
feat: lua backed history (#187)
* refactor: put file history handler in line reader instance instead of global

* feat: add lua history handler in go

* feat: use lua to retrieve readline history

* refactor: handle history in lua

this also introduces a new opt: history
if it is false, command history won't get added

* fix: remove nature.history require

* docs: add changes in changelog

* fix: add comma after history opt
2022-07-13 16:02:09 -04:00
TorchedSammy f7806f5479 docs: [ci] generate new docs 2022-07-13 19:46:40 +00:00
TorchedSammy c8c30e9861
docs: update changelog 2022-07-13 15:46:18 -04:00
TorchedSammy 083c266438
feat(golibs/fs): add join function to join path elements 2022-07-13 15:38:07 -04:00
TorchedSammy dd9bdca5e0
fix(readline): only call raw input callback if not nil 2022-07-13 15:35:33 -04:00
TorchedSammy 9902560061
fix: set vt in on stdin 2022-07-13 15:11:06 -04:00
TorchedSammy dd9aa4b6ea
fix: enable vt input for windows 2022-07-13 15:04:18 -04:00
TorchedSammy be8bdef9c8
style: use single line import instead of list syntax 2022-07-13 14:18:23 -04:00
TorchedSammy e185a32685
fix: expand tilde in dataDir on windows 2022-07-13 14:10:29 -04:00
TorchedSammy 2b480e50e6
feat: print tracebacks for errors 2022-07-13 10:08:23 -04:00
TorchedSammy b65acca903
fix: initialize line reader before lua init 2022-07-10 22:07:01 -04:00
TorchedSammy 08e2951513
feat: add raw input hook (closes #180) 2022-07-10 20:34:00 -04:00
TorchedSammy 83a2ce38ea
docs: remove getting started section on readme 2022-07-09 18:39:21 -04:00