sammyette
30ffe9cab0
fix: handle error before getting commander exit code
...
this fixes a register underflow issue if a commander causes an error
2021-06-14 18:02:44 -04:00
sammyette
36ea20b550
fix: aliases in sh interp exec handler
2021-06-12 11:52:56 -04:00
sammyette
81f7b77b8b
docs: fix description of -l flag
2021-06-12 10:49:22 -04:00
sammyette
e6c4c32bd7
feat: handle -h option
2021-06-12 10:48:57 -04:00
sammyette
b974ada64e
fix: comment out unused module
2021-06-12 10:43:13 -04:00
sammyette
7e5f9e9541
fix: remove debug logging
2021-06-12 10:41:51 -04:00
sammyette
a413b28f2a
fix: define deregister function in commander module
2021-06-12 10:32:48 -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
fb04322844
feat: add option for fs.mkdir to make recursive
2021-06-12 09:31:42 -04:00
sammyette
cd06c61195
chore: bump version
2021-06-11 23:59:00 -04:00
sammyette
f594d48790
fix: print error in interval func instead of panic
2021-06-11 23:54:18 -04:00
sammyette
a4dbfbf4bb
feat: add hilbish.home
...
`hilbish.home` is the user's home directory path
this is a cross platform variable that works instead of using
`$HOME` (which isnt set in windows cmd, i think)
2021-06-11 21:49:28 -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
419e327d95
fix: prompt for new input on error with ContinuePrompt
...
basically, dont disregard the error we get and dont return previous
input. now we try to prompt for new input without running the
previous if the function got an error
2021-06-11 18:26:34 -04:00
sammyette
7a8df8b9f2
revert: fix: return previous input on continue input error
...
This reverts commit 5b03b3cef4
.
we shouldn't return this just to fix the panic,
instead just handle the error
2021-06-11 18:25:24 -04:00
sammyette
5b03b3cef4
fix: return previous input on continue input error
...
this is basically 72973eade7
but it actually works and doesnt break everything
if an error occurred with the ContinuePrompt function (in this case,
the error is simply EOL/ctrl d) then return previous input alone
2021-06-11 18:08:31 -04:00
sammyette
03b98bdd26
revert: fix: panic on ctrl d on continued input
...
This reverts commit 72973eade7
.
i'm kinda a bit dumb
this fix broke basically everything else that used the splitInput
function
2021-06-11 18:03:52 -04:00
sammyette
72973eade7
fix: panic on ctrl d on continued input
...
basically when a person did the continue prompt (input ending with `\`)
and exited with ctrl d it caused a panic
this was the simplest way to fix that
2021-06-11 17:58:35 -04:00
sammyette
b3a28b067c
style: use camel case for var name
2021-06-10 06:29:35 -04:00
sammyette
edcc1b39f0
docs: add todo to lua.go
2021-06-09 20:43:01 -04:00
sammyette
646cb93dec
feat: support comptime sample conf declaration
2021-06-09 20:33:30 -04:00
sammyette
13dc0cd857
feat: support comptime config dir declaration
2021-06-09 20:30:53 -04:00
sammyette
792ce996d3
fix: return 0 exit code when cd with noarg instead of throwing hook explicitly
2021-06-09 20:30:12 -04:00
sammyette
95dee1f4dd
fix: check aliases before going to sh interp
2021-06-09 19:16:08 -04:00
sammyette
14064eceda
chore: cleanup and remove extra spaces
2021-06-09 18:41:37 -04:00
sammyette
ce5ac86a4c
docs: make build for stable release more clear
2021-06-09 18:19:52 -04:00
sammyette
fa1cdbefa2
docs: move aur install step up
2021-06-09 18:18:23 -04:00
sammyette
a9b39834b3
docs: make build steps clearer
2021-06-09 18:16:04 -04:00
sammyette
6cbebcbae9
docs: fix arch install step for readline
2021-06-09 18:13:43 -04:00
sammyette
42c22aac96
docs: add newline between readline dep and fedora install step
2021-06-09 18:12:45 -04:00
sammyette
084f049ba5
style: add spaces between multiply op
2021-06-09 18:10:34 -04:00
Daniel de Sá
ea67ae228c
docs: add readline install for arch ( #60 )
2021-06-09 14:38:04 -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
be5ebd6ada
feat: add back cancel input on ctrl c
2021-06-08 21:00:01 -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
f0013096fd
chore: update urls to reflect org name change
2021-06-03 19:19:22 -04:00
sammyette
f6986446c0
docs: go get all modules
2021-06-03 19:18:51 -04:00
sammyette
1623f0d85d
fix: dont go interactive if not terminal ( closes #48 )
2021-06-01 22:14:59 -04:00
sammyette
7e970e9e81
feat: increment $SHLVL ( closes #55 )
2021-05-28 23:13:18 -04:00
sammyette
5408e68e19
fix: use hilbish.cwd to get cwd
2021-05-27 19:06:45 -04:00
sammyette
af4b4b2ae0
feat: add hilbish.cwd function
2021-05-27 19:06:17 -04:00
sammyette
ba6d7972e0
chore: merge
2021-05-27 18:34:16 -04:00
Devin Singh
9573c2732d
feat: cd - changes pwd to previous one
...
close #53
2021-05-27 17:26:02 -05: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
9defa737f4
fix!: remove recursive aliases
...
i dont think this is really useful and since the `args` provided
by the sh interp dont include quotes i can't split with our own
function, which is a problem
i also removed running lua code like a sh command, now its only
entire input for lua; like it was before
2021-05-25 20:05:11 -04:00
sammyette
b608ea6bc8
chore: remove unused dep
2021-05-24 07:29:52 -04:00