Commit Graph

43 Commits (0c15996d83354dae75b137be5ffc7aee1c3c1052)

Author SHA1 Message Date
TorchedSammy 0c15996d83
docs: update doc for prompt function 2022-04-13 09:53:30 -04:00
TorchedSammy a2a2d5e5e7
feat: add right prompt (closes #111) 2022-04-13 08:59:10 -04:00
TorchedSammy 2814f44163
fix: typo in timer create function 2022-04-12 19:41:50 -04:00
TorchedSammy 508fd5f8a2
docs: update docs for timer related functions 2022-04-12 19:37:15 -04:00
TorchedSammy c95ff42dee
feat: add timer pool and api (closes #135)
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.
2022-04-12 19:31:48 -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 62a6cc56b9
docs: document hilbish.highlighter 2022-03-26 18:28:01 -04:00
TorchedSammy 76f100ca77
feat: expose syntax highlighting (closes #125) 2022-03-26 18:25:19 -04:00
TorchedSammy 6ea25a22b3
feat: add inline hint text and change what were hints previously to info (closes #126) 2022-03-26 17:34:09 -04:00
TorchedSammy 3636efe7f8
docs: add doc for mode param of runnerMode function 2022-03-22 18:33:11 -04:00
TorchedSammy 2fe888e186
feat: add hilbish.jobs interface and add stop function to job in hooks (closes #109) 2022-03-20 19:10:12 -04:00
TorchedSammy 654ca4b527
docs: fix hilbish.alias doc 2022-03-20 17:54:02 -04:00
TorchedSammy 86a15e6363
feat: add configurable runner mode (closes #110) 2022-03-20 15:15:44 -04:00
TorchedSammy 96c1487bfa
fix: make sure complete input is added to history 2022-03-19 18:48:03 -04:00
TorchedSammy 1378a74e87
feat: add job hooks (part of #109) 2022-03-19 13:10:50 -04:00
TorchedSammy 63bc398f1c
fix: use unexported alias handler init function 2022-03-19 12:44:26 -04:00
TorchedSammy 01d937afd8
fix: correct username in greeting on windows 2022-03-16 18:42:38 -04:00
TorchedSammy ba67278fad
fix: dont print types of args in appendPath 2022-03-06 17:19:47 -04:00
TorchedSammy 5c4335ec6a
docs: include guide command in greeting message 2022-03-06 14:56:04 -04:00
TorchedSammy 4ef6c7d5c0
fix: hilbish.read overriding history 2022-03-06 14:38:27 -04:00
TorchedSammy fb3cedb161
fix: set prompt in hilbish.read 2022-03-06 14:23:41 -04:00
TorchedSammy 4b57dc2ed8
feat: add hilbish.exitCode property (closes #101) 2022-03-06 12:09:10 -04:00
TorchedSammy 928b829388
fix: set hilbish.vimMode property before throwing hook 2022-03-06 12:08:00 -04:00
TorchedSammy 76c94bfcce
docs: fix docs for hilbish.complete 2022-03-05 16:12:46 -04:00
TorchedSammy 0ed365170c
refactor!: completion api, add hilbish.completion interface
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
2022-03-05 15:59:00 -04:00
TorchedSammy f1dfd59c4c
fix: add back prompt global var
fixes an issue with multiline prompt overriding user's prompt
permanently
2022-03-05 15:46:38 -04:00
TorchedSammy 9f206ebed0
fix: export hilbish.complete 2022-03-05 11:38:33 -04:00
TorchedSammy 5175367b35
fix: handle errors in goro and timeout callbacks 2022-03-04 22:21:34 -04:00
TorchedSammy 6b9bbb615d
fix: handle prompt properly and remove global 2022-03-04 21:54:47 -04:00
TorchedSammy 99461e42d0
fix: export hilbish.goro (closes #98) 2022-03-04 14:40:54 -04:00
TorchedSammy e7ac7ce843
feat: add hilbish.os interface (closes #94) 2022-03-02 19:11:57 -04:00
TorchedSammy e8d0ea12cc
fix: add substitute for exec syscall on windows 2022-03-01 22:14:55 -04:00
TorchedSammy c175bb4d8a
docs: add emmylua doc comments for hilbish module functions 2022-03-01 22:12:48 -04:00
TorchedSammy 065d752b82
feat: accessible vim input mode (closes #95) 2022-03-01 22:00:46 -04:00
TorchedSammy 062f40e9e5
fix: push hilbish.which return value properly 2022-03-01 19:34:07 -04:00
TorchedSammy 3b6284bc7c
feat: add hilbish.which (closes #93) 2022-03-01 18:59:44 -04:00
TorchedSammy d9d2152e04
fix: add full command after complete prompt to history 2022-02-27 19:12:58 -04:00
TorchedSammy 715a67b882
docs: add emmylua annotations for hilbish module functions 2022-02-26 11:36:04 -04:00
TorchedSammy e3a0195eb3
refactor!: remove hilbish.flag
not really that useful
2022-02-26 11:29:20 -04:00
TorchedSammy f05ab921d7
refactor!: use better default paths
~/.hilbishrc.lua has been removed and will no longer be loaded.
instead, $XDG_CONFIG_HOME/hilbish/init.lua is to be used

the history path has been changed to a more suited one.
on linux, it is in $XDG_DATA_HOME/hilbish/.hilbish-history,
or otherwise ~/.local/share/hilbish/.hilbish-history
2022-02-23 22:19:54 -04:00
TorchedSammy 22d8a61544
feat: add hilbish.history interface (closes #85) 2022-01-27 17:02:21 -04:00
TorchedSammy f2a2ac44d6
refactor!: move global functions to the hilbish module
its more organized this way and the `hilbish` lua module
is now what global was before anyway

a feature in this commit also is that `goro` now allows
passing any amount of args to the calling function
2022-01-26 15:51:52 -04:00
TorchedSammy c03671f47d
chore: rename files to avoid collision (hilbish bin and shell.nix) 2021-12-31 20:00:39 -04:00