Commit Graph

59 Commits (740adf27f3ff8ea61a842f9ad5cd310395169a71)

Author SHA1 Message Date
TorchedSammy bcc249a4bd
feat: add aliases interface (closes #87 and #86)
500th commit!
adds the `hilbish.aliases` interface
it allows you to add, delete and get all aliases

there was also a slight refactor with alias resolving in this commit,
there is a single resolve function instead of duplicate code.
with consideration this could be exported to lua side,
but i see no reason for it
2021-12-14 20:54:23 -04:00
TorchedSammy bcfbb20685
fix: dont export lua init 2021-12-08 23:31:48 -04:00
TorchedSammy 5c6310b1ca
refactor: dont export functions and types 2021-12-06 17:21:31 -04:00
TorchedSammy 2e21af4d6b
refactor: use curuser to get homedir everywhere 2021-12-01 18:31:04 -04:00
TorchedSammy 9261253b63
fix: stop interval if error occurs 2021-11-28 09:29:17 -05:00
TorchedSammy f6aaf85cca
fix: make minimal config actually minimal and not require lunacolors 2021-11-27 22:51:32 -05:00
TorchedSammy af4c3885ae
feat: add signal hooks for sigint and sigwinch (#80) 2021-11-22 15:13:05 -05:00
TorchedSammy 94a8b4ad47
feat: add prependPath function (resolves #81) 2021-11-22 12:46:39 -05:00
TorchedSammy 72cf776882
fix: use golang path list separator to not be unix specific 2021-11-22 12:45:45 -05: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 3d53e85fc9
feat: add terminal package
a simple, smaller but lower level terminal library, mainly used to set
raw mode. functions:
size, save and restore current state, set raw mode. documentation is in
docs/terminal.txt or `doc terminal` in hilbish
2021-10-17 16:10:57 -04:00
sammyette 784e611272
chore: remove unused setField func 2021-10-16 15:33:57 -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 2ef2998279
fix: make timeout() blocking
may or may not be temporary
2021-09-18 22:48:28 -04:00
sammyette 26eee56c8b
feat: add commander.deregister function
simply deregisters/removes a lua defined command
2021-06-12 10:30:47 -04:00
sammyette f594d48790
fix: print error in interval func instead of panic 2021-06-11 23:54:18 -04:00
sammyette efc956a04c
fix: cleanup, store lua commands in map 2021-06-11 21:37:52 -04:00
sammyette 1e1662a6b2
feat: add interval function
interval(func, time)
works exactly the same as `setInterval` in javascript
runs `func` in an interval of `time` milliseconds
2021-06-11 21:21:41 -04:00
sammyette fe3df8c66e
feat: add timeout function
timeout(func, time)
works exactly like the `setTimeout` function in javascript
runs `func` after a period of `time` in milliseconds
2021-06-11 19:40:08 -04:00
sammyette edcc1b39f0
docs: add todo to lua.go 2021-06-09 20:43:01 -04:00
sammyette e37abcb08b
feat: define preload file in var
same as before, enables changing at compile time
2021-06-08 21:00:31 -04:00
sammyette 86dbb97cae
feat: define lua require paths in var
this makes it able to be changed compile time, which should help
in support for systems that dont follow fhs (damn nix)
and windows as well, but that'll be first class
2021-06-08 19:16:37 -04:00
sammyette 2a084fc03e
fix: make minimal config work with new version 2021-06-08 17:40:52 -04:00
sammyette ef45bafb54
fix: remove extra newline in error message 2021-06-08 17:24:54 -04:00
sammyette c1b9e5bc81
feat: add goro function
this function will run another function, but in a goroutine
!!
2021-05-25 20:44:03 -04:00
sammyette ef1ced4a04
refactor: make `hilbish` an already required module and add run function
idk how to explain this man
in code `hilbish` is now a module, which can also be required like
others. but it is already a global export as the variable of the same
name.
also
2021-05-16 17:13:28 -04:00
sammyette 88e117974e
chore: add todo comment for exec function 2021-05-16 16:17:55 -04:00
sammyette e29ba6a0d5
feat!: move username and version access to hilbish table
instead of having ugly `_user` and `_ver` variables,
`hilbish.user` and `hilbish.version` is used
2021-05-16 15:53:21 -04:00
sammy 0afca3d4f6
fix: dont append to path if dir is already there (resolves #52) 2021-05-15 22:23:21 -04:00
sammy 630d7dde9c
fix: prefer to run preload in cwd first 2021-05-11 18:55:05 -04:00
sammy 8f94990fc3
feat: add exec function
this is basically the `exec` "command" in sh
itll replace hilbish with whatever provided
simple usage:
exec 'sleep 100'
2021-05-08 11:50:09 -04:00
sammy 6e3f1e1b97
fix: add additional lua import path 2021-05-01 15:56:08 -04:00
sammy c43aab6a60
fix: make appendPath expand ~ to home dir 2021-05-01 15:35:43 -04:00
sammy a75100d15d
feat: add _user variable
this will probably change to a better global var in the
future, but it's `_user` now.
this provides a simple, guaranteed way of getting the
current user's name
$USER (in?)correctly shows the previous user when
`su` is used, _user will always be root in this case
2021-05-01 14:51:57 -04:00
sammy 7f8d8db53e
fix: errors and make login rc run before config 2021-05-01 14:17:14 -04:00
sammy 38f1d62598
feat: make hilbish act like a login shell
when a user logs in with hilbish as the user shell,
or -l/--login is passed
resolves #37
2021-05-01 14:08:42 -04:00
sammy e580112e1b
refactor: use lua.Check<Type> where possible (resolves #40) 2021-05-01 13:42:15 -04:00
sammy d7104ec591
refactor(minor): reduce amount of renamed modules to 0 now 2021-04-28 19:22:11 -04:00
sammy e0cf87d272
refactor(minor): reduce the amount of module renaming 2021-04-28 18:57:28 -04:00
sammy d551d0f2ab
style: add spaces between binary ops and rename appendpath function to be camelCase 2021-04-28 18:35:04 -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
sammy d4ecdd5ea0
feat: -i (--interactive) and -c (--command) flag 2021-04-24 00:12:18 -04:00
Devin Singh 94f0ccf9f6
chore: formatting 2021-04-18 21:09:27 -05:00
sammy 21e6ff8055 fix: lua require paths 2021-04-11 17:44:34 -04:00
sammy a9c5b4eea1 fix: lua require paths 2021-04-11 17:09:54 -04:00
sammy 3c4351a8fe fix: remove print 2021-04-09 23:14:10 -04:00
sammy 3cb8e64dc0 feat: add more require paths and change ordering 2021-04-09 23:13:28 -04:00
sammy 3523bfa28b feat: add more paths to package.path 2021-04-09 18:22:05 -04:00