Commit Graph

19 Commits (5b4615800802b7aef89492a222729d9bf4958081)

Author SHA1 Message Date
sammyette 42ab856e45
feat(commander): add function to return all commanders (closes #266) 2024-04-27 21:29:06 -04:00
sammyette a20123fc24
feat: allow hilbish.run to take a table of files to use for output (#291) 2024-04-27 21:03:54 -04:00
sammyette 8fdae6c1d7
refactor: doc improvements (again) (#260) 2023-12-25 22:08:29 -05:00
sammyette 61914f8dc7
docs: add docs for sink type (closes #233) 2023-02-07 15:39:22 -04:00
sammyette 2f6ab5fd92
feat: add sink for commanders to write output/read input (#232)
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
2023-01-20 19:07:42 -04:00
sammyette 78c95de784
refactor: remove doc prop related code
should very very slightly improve startup. it's dead, obsolete,
and unused code now anyways with the docs refactor
2022-12-20 00:54:05 -04:00
sammyette e5eefb1d2d
refactor!: rework docs and doc command (#218)
changes the actual file format of docs to markup since that's basically what we have been
using in the first place.

the docgen command has been modified to write markdown headings with the function name and
yaml metadata for easy consumption by hugo for the website.

all other docs have been moved to markdown as well this is the main reason this is a "breaking" change
users will have to reinstall hilbish (task uninstall and task install) to remove the old plaintext docs
2022-12-15 00:00:54 -04: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
sammyette 0fc5f457ad
refactor!: support lua 5.4 (#129)
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
2022-04-04 06:40:02 -04:00
TorchedSammy a77b997942
refactor: add emmylua docs for all functions appropriate 2022-02-25 18:15:25 -04:00
TorchedSammy dc608436c1
fix(commander): omit the 'in the shell' part for the description 2022-02-25 18:08:49 -04:00
TorchedSammy 3568b62219
style: use decl and assign operator instead of var and = 2021-12-01 17:29:14 -04:00
sammyette 3cafbe8c4f
docs: document `hilbish` module functions, xdg vars, and add descriptions for modules 2021-10-16 12:41:10 -04:00
sammyette 1689d80721
feat: add docgen program, document almost all hilbish functions 2021-10-16 10:21:05 -04:00
sammyette a413b28f2a
fix: define deregister function in commander module 2021-06-12 10:32:48 -04:00
sammyette 26eee56c8b
feat: add commander.deregister function
simply deregisters/removes a lua defined command
2021-06-12 10:30:47 -04:00
sammy e580112e1b
refactor: use lua.Check<Type> where possible (resolves #40) 2021-05-01 13:42:15 -04:00
TorchedSammy adb3c0df16 feat: use commanding table to store custom commands, load preload file and set require path in go 2021-03-21 12:42:04 -04:00
TorchedSammy f910c9dea4 "feat: add lua libs for filesystem access and custom commands - written in go" 2021-03-20 18:49:15 -04:00