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
TorchedSammy
0fa3d50db7
feat: add -C flag ( closes #20 )
2021-04-07 08:40:40 -04:00
TorchedSammy
84d55a38b0
feat: change multiline prompt via multiprompt function ( closes #13 )
2021-04-05 18:09:21 -04:00
TorchedSammy
271ea946eb
fix: update to work with latest ansikit
2021-04-05 17:26:55 -04:00
TorchedSammy
ef4975f984
feat: fallback to default config on error loading user conf
2021-04-04 20:31:32 -04:00
TorchedSammy
4f4237a3e9
chore: split up go source files
2021-04-03 13:13:45 -04:00
TorchedSammy
1d22e4cdc1
fix: move LuaInit function to lua.go
2021-03-30 22:37:08 -04:00
TorchedSammy
5186d785a9
feat: aliases via alias(alias, orig)
2021-03-21 17:20:19 -04:00
TorchedSammy
198f5f6334
"feat: add custom commands via lua in config"
2021-03-20 18:51:05 -04:00
TorchedSammy
716d24963f
add lua config
2021-03-19 19:03:11 -04:00