Commit Graph

38 Commits (fuzzy-history-search)

Author SHA1 Message Date
sammyette 9e1ec1641c
docs: fix return types for functions (closes #229) 2023-02-07 18:18:03 -04:00
sammyette a105b8e38d
docs: improve emmy lua annotations 2022-12-20 20:59:55 -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
TorchedSammy 083c266438
feat(golibs/fs): add join function to join path elements 2022-07-13 15:38:07 -04:00
TorchedSammy 453ba9f8ad
feat(fs): add some functions and properties (closes #168) 2022-06-20 16:47:16 -04:00
TorchedSammy db437905e0
fix: implicitly expand tilde on args to all fs functions 2022-05-01 00:49:59 -04:00
TorchedSammy 1714aeac36
feat: add fs.abs 2022-04-23 00:03:49 -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 a74c9a4200
docs(fs): change bool to boolean 2022-02-25 18:17:04 -04:00
TorchedSammy a77b997942
refactor: add emmylua docs for all functions appropriate 2022-02-25 18:15:25 -04:00
sammyette 80acd0857d
fix(cd): use correct var 2021-10-21 20:55:54 -04:00
sammyette 1a7dccb757
feat(cd): show path in error messages 2021-10-21 20:49:00 -04:00
sammyette 86013e6576
fix: use RaiseError function from gopher-lua instead of Error 2021-10-17 17:55:21 -04:00
sammyette 006f0f986e
fix(fs): stop using luar, make readdir return a proper table 2021-10-17 17:26:29 -04:00
sammyette 6b065dc035
fix(fs): make stat better
return a table with 4 values: name, size, mode and isDir
name -> name of path
size -> size (obviously)
mode -> permissions mode in a string as octal format
isDir -> whether path is a directory
2021-10-17 12:56:45 -04:00
sammyette bd3e9fdca6
docs: make linebreaks to descriptions for better alignment 2021-10-16 15:36:30 -04:00
sammyette 20acfad2c2
fix(fs)!: handle mkdir error, change error return for cd
breaking change: cd now returns a message instead of a code to indicate the error.
any error in mkdir is now handled
2021-10-16 13:49:01 -04:00
sammyette 539a39f83a
feat: add fs.readdir function
it takes 1 argument: the directory to read.
2021-10-16 13:47:39 -04:00
sammyette 452335d84a
fix: change luaErr to return string instead of code 2021-10-16 13:47:09 -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 afcc6fe63a
fix: handle error case of target in fs.cd not being a dir (closes #66) 2021-09-28 22:55:08 -04:00
sammyette a6a3962044
fix: correct url to github repo and add newline after error 2021-09-28 22:54:04 -04:00
sammyette fb04322844
feat: add option for fs.mkdir to make recursive 2021-06-12 09:31:42 -04:00
sammyette 9f1ad83c51
feat: print on unhandled err case for fs.cd 2021-05-19 17:00:23 -04:00
sammy e580112e1b
refactor: use lua.Check<Type> where possible (resolves #40) 2021-05-01 13:42:15 -04:00
sammy d2a44c70c0
chore: remove redundant module renaming 2021-05-01 13:38:01 -04:00
sammy a29eddb1bf
style: remove extra spaces at map; dont make them lineup 2021-04-28 18:54:16 -04:00
Devin Singh 786b95c266
feat: appendpath function 2021-04-28 17:09:10 -05:00
Devin Singh 4476a96eec
feat(wip): add appendpath 2021-04-28 16:57:06 -05:00
TorchedSammy 2c711de9dc feat: add mkdir and stat functions to fs module 2021-04-09 18:10:18 -04:00
TorchedSammy b1f2a36639 fix: trim spaces in cd func 2021-03-31 13:46:49 -04:00
TorchedSammy a9018a2740 fix: return correct error code and fix error level 2021-03-31 07:32:47 -04:00
TorchedSammy 60a0204958 chore: add todo node 2021-03-31 00:02:39 -04:00
TorchedSammy 0d5c826f54 fix: change error level to 2 2021-03-30 23:57:13 -04:00
TorchedSammy 5dd7ce382a fix: throw lua error if fs.cd fails 2021-03-30 23:56:37 -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