Commit Graph

883 Commits (history-searcher)

Author SHA1 Message Date
TorchedSammy 40c2933a95
feat: add history filter handler
this adds a history handler which will be called
on all history and returns a boolean
to signify whether to include the command
in the history menu or not

it is passed 2 arguments: the user query and
command
2022-07-17 18:25:54 -04:00
TorchedSammy 7434d270e4
perf(readline): make completion group with passed suggestions instead of looping over history twice 2022-07-17 18:25:19 -04:00
TorchedSammy 3dae826578
feat(readline): pass suggestions to history searcher callback 2022-07-17 18:22:00 -04:00
TorchedSammy 001bd15ced
chore: merge from master 2022-07-17 11:56:14 -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 bbf5a93ca0
feat: add history search handler 2022-07-11 00:11:00 -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
TorchedSammy 60dd5f598a
docs: replace make with task on readme 2022-07-09 18:38:57 -04:00
TorchedSammy 6eea5bce47
feat: add motd (closes #185) 2022-07-09 17:54:21 -04:00
TorchedSammy a106f4aea0
refactor!: move hilbish.greeting to an opt (closes #184) 2022-07-09 17:15:13 -04:00
TorchedSammy 90ed12d551
feat: add hilbish.init hook (closes #186) 2022-07-09 17:04:50 -04:00
sammy e0694c8862
build!: replace make with task (#171)
* build!: replace make with task

allows easy windows building (besides literally go build)
down the line because getting make on windows is dumb
and even if you do it probably wouldnt work as intended
on there

(i also find task more intuitive for simple things)

* ci: use task in build workflow instead of make

* style: remove whitespace errors in task file

* docs: add task in changelog

* docs: fix link to task

* docs: change message for task notice
2022-07-09 11:44:53 -04:00
TorchedSammy d27ce26be0
feat: complete files plainly if tab query begins with quotes (workaround #183) 2022-07-09 10:45:42 -04:00
TorchedSammy 587d08773f
chore: merge from remote 2022-06-20 17:16:59 -04:00
TorchedSammy 362bb14d7e
feat: auto start lua modules (closes #167) 2022-06-20 17:07:15 -04:00
TorchedSammy 153a89b188 docs: [ci] generate new docs 2022-06-20 20:47:56 +00:00
TorchedSammy 453ba9f8ad
feat(fs): add some functions and properties (closes #168) 2022-06-20 16:47:16 -04:00
TorchedSammy 3e807f5235
fix: handle lua eval errors and normal runner errors separately 2022-06-20 15:47:19 -04:00
TorchedSammy 7e57b3de7d
fix: check if input is 0 on multiline splitting (closes #170) 2022-06-20 15:35:25 -04:00
sammyette 226605a996
feat: allow runners to specify if they want more input (#162)
* refactor!: make runners require returning a table

allows for more options for runners in the future,
and makes it so that you can avoid passing
certain args more easily.

* feat: allow runners to specify continue in return to prompt for more input

* docs: update changelog

* refactor: reorder returns of handleSh function

* refactor: move out reprompting and runner handling to functions

makes codefactor happy hopefully. this commit includes
a fix to check if after reprompt the user hits ctrl d
and just exits cleanly
2022-06-02 22:33:30 -04:00
TorchedSammy 1b4b41846f
chore: merge from remote branch 2022-05-31 15:17:50 -04:00
TorchedSammy 3196f0dcb9
fix: don't refetch tab completion on refresh if its already open (closes #163) 2022-05-31 15:16:32 -04:00
TorchedSammy 3f745e7e4d
docs: update contributing info to include writing changes to changelog 2022-05-30 18:16:36 -04:00
TorchedSammy f9a2a981b4
fix: revert "fix: multiline cursor redraw"
This reverts commit 1339dc4a2f.
this caused a few issues, including
history search messing up previous lines
what this commit was trying to fix is unimportant anyway
2022-05-29 19:02:20 -04:00
TorchedSammy 1339dc4a2f
fix: multiline cursor redraw 2022-05-28 21:05:03 -04:00
TorchedSammy b4a5746093
ci: use make to build for artifacts 2022-05-28 20:21:57 -04:00
TorchedSammy 2faaf4e045
fix: print err don't panic and in the case of regex compile failing on menu find 2022-05-28 20:19:49 -04:00
sammyette 3990d370fa
feat: extend hilbish.runner interface to allow multiple runners (#159) 2022-05-28 19:06:18 -04:00
sammyette b28a2c24c1
refactor!: use userdata where appropriate (#157)
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
2022-05-28 19:03:44 -04:00
TorchedSammy e3c25586e4
fix: broken ansi escape codes on windows cmd 2022-05-28 09:07:28 -04:00
TorchedSammy 9d385efbfc
docs: add new methods for job objects 2022-05-24 19:32:03 -04:00
TorchedSammy d99c24842f
docs: update changelog 2022-05-24 19:31:51 -04:00
TorchedSammy 61271dc70c
fix: load bg command on init 2022-05-24 19:26:35 -04:00
sammyette 8697344f98
feat: implement job foregrounding/backgrounding (#155) 2022-05-24 19:15:02 -04:00
TorchedSammy d65b574cb2
docs: fix typo in job hook docs 2022-05-22 07:29:01 -04:00
TorchedSammy d808534da6
perf: use waitgroup instead of loop to wait on timers 2022-05-21 21:58:58 -04:00
TorchedSammy a4b358fd9c
perf: use struct{} for done channel in timer instead of bool 2022-05-21 21:39:14 -04:00
TorchedSammy 8f6f27e647
docs: add docs for lunacolors (closes #144) 2022-05-21 21:28:06 -04:00