Commit Graph

48 Commits (e3c25586e42f770f85401440cb32cc6752fdfd39)

Author SHA1 Message Date
sammyette 8697344f98
feat: implement job foregrounding/backgrounding (#155) 2022-05-24 19:15:02 -04:00
sammyette d2f16dfbbf
feat: job enhancements (#153)
* feat: add hilbish.job.add function

this is mainly to accomodate for the employer
handler (#152)

* feat!: add start function to jobs

the commit itself adds a few things but the
main purpose is to facilitate a lua side start
function that can restart the job

there is a breaking change in the hilbish.job.add
function; it is now required to provide an extra
table for arguments, since the first cmd
table isnt really what's actually ran

* fix: reuse standard files for jobs

* fix: deadlock in lua job add function and not taking proper amount of args

* fix: assign binary path to job

* feat: emit job.add hook when job is added

* chore: update modules

* fix: use setpgid on cmd procattr for background jobs

* fix: use right procattr on correct os

* fix: set bg proc attr in build tagged file

* feat: add disown function

* fix: stop jobs on exit

* feat: add disown command

* feat: add jobs.last function to get last job

* feat: make disown command get last job if id isnt suppied as arg

* chore: remove unused code

* feat: add job output

* chore: fix comments

* fix!: make exec path in job add explicit in lua side

* docs: add docs and changelogs relating to jobs
2022-05-21 20:53:36 -04:00
ym555 6ccb9ebeff
fix(readline): take into account character width (#145)
first step towards unicode support yay
2022-04-20 08:18:34 -04:00
TorchedSammy 9d69b63a0f
chore: update golua (closes #142) 2022-04-19 14:37:57 -04:00
TorchedSammy 393fe3962f
chore: update golua 2022-04-05 22:50:14 -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 34ae8ade7b
chore: tidy go modules 2022-03-29 15:28:39 -04:00
TorchedSammy 9ff6e5879f
chore: bump go version to 1.17 2022-03-29 13:31:16 -04:00
TorchedSammy 5a2e3e4700
chore: bring readline in repo for easier maintenance 2022-03-13 13:48:49 -04:00
TorchedSammy f8f8cd0b59
chore: update dependencies 2022-03-06 10:07:28 -04:00
TorchedSammy 058d6ac456
chore: update readline 2022-03-05 14:40:38 -04:00
TorchedSammy 63e33af34d
chore: update readline 2022-03-04 20:48:22 -04:00
TorchedSammy e7ac7ce843
feat: add hilbish.os interface (closes #94) 2022-03-02 19:11:57 -04:00
TorchedSammy 065d752b82
feat: accessible vim input mode (closes #95) 2022-03-01 22:00:46 -04:00
TorchedSammy ad6d3193ff
chore: update readline lib 2022-02-27 23:22:37 -04:00
TorchedSammy 3cdd21a4fa
refactor: remove gnu readline 2022-02-27 19:27:18 -04:00
TorchedSammy 3165552c21
refactor: make go readline lib default, remove hilbiline 2022-02-27 19:21:34 -04:00
TorchedSammy 06221e06cd
chore: fix hilbiline version 2022-02-26 11:25:28 -04:00
TorchedSammy 15caa6e449
chore: replace gopher-lua import with github link 2022-02-25 20:42:50 -04:00
TorchedSammy d448ef07e0
chore: update manifests 2022-02-25 20:37:11 -04:00
TorchedSammy 8821171ff5
chore: clean up and update modules 2022-01-02 19:21:34 -04:00
TorchedSammy 970fe43413
chore: remove newline between replace directives in module file 2021-12-07 18:01:39 -04:00
TorchedSammy 2f809e398c
fix: use fork of go readline 2021-12-06 20:56:04 -04:00
TorchedSammy 6653fa2e03
feat: add new readline lib
this is an almost 100% working readline implementation
in go, will add tab completion in another commit
2021-12-06 20:48:16 -04:00
TorchedSammy 369ddcc100
chore: use correct version of hilbiline 2021-12-06 17:19:22 -04:00
TorchedSammy 28fcdb3122
fix: take care of readline segfault, update deps 2021-12-06 16:24:25 -04:00
TorchedSammy 123f8992b1
feat: add tab completion api
tab complete is better than it was before!
there is a new `complete` function which allows adding custom arguments
to complete specific functions.
hilbish will now also complete executables if it's the first input
argument (this also works with ./)
if no completion is added for a command, hilbish will just complete
files
2021-11-22 11:24:31 -05:00
sammyette 2f816c33cd
fix: revert "chore: update deps"
This reverts commit e06765abc3.
broke builds
2021-10-30 23:08:29 -04:00
sammyette e06765abc3
chore: update deps 2021-10-30 20:01:07 -04:00
sammyette 54d88f9f6c
fix: use forked version of sh interp 2021-10-21 21:52:40 -04:00
Gabriel Rato c29b6c6fd4
fix: break for loop after finding the aliased command (#73) 2021-10-11 21:45:52 -04:00
sammyette f0013096fd
chore: update urls to reflect org name change 2021-06-03 19:19:22 -04:00
sammyette b608ea6bc8
chore: remove unused dep 2021-05-24 07:29:52 -04:00
sammyette 207f6ba719
chore: resolve merge conflicts 2021-05-24 07:26:30 -04:00
sammyette dc09bae6e4
chore: update hilbiline url to reflect org name change 2021-05-24 07:09:24 -04:00
sammyette 2230b8bd45
chore: update deps (mainly hilbiline) 2021-05-23 22:01:09 -04:00
sammyette aa7de15997
chore(deps): update dependencies 2021-05-18 20:40:41 -04:00
sammyette e0851809ab
feat: make readline agnostic, add hilbiline to test 2021-05-17 19:03:56 -04:00
sammy 507c8b6ed2
chore: update manifest files 2021-05-01 01:07:55 -04:00
sammy 3862d2898c
chore: update manifests 2021-04-24 00:10:51 -04:00
sammy b37f2411c7
chore: update manifests 2021-04-18 15:42:39 -04:00
sammy 5e44b84272
chore: update manifest files 2021-04-16 10:28:28 -04:00
TorchedSammy 76d0806375 feat: switch to master's readline lib; add tab complete and sh support 2021-03-24 14:50:22 -04:00
TorchedSammy cf317a9c64 fix: include other path (/usr/share/hilbish/) for packages 2021-03-21 02:27:16 -04:00
TorchedSammy 198f5f6334 "feat: add custom commands via lua in config" 2021-03-20 18:51:05 -04:00
TorchedSammy 52cf7e4799 feat: add command line flags and set SHELL, make commands exit on ctrl c 2021-03-20 00:03:25 -04:00
TorchedSammy f69eaaab44 update dependencies 2021-03-19 19:03:53 -04:00
TorchedSammy 981acc49d2 initial commit 2021-03-19 15:11:59 -04:00