sammyette
084f049ba5
style: add spaces between multiply op
2021-06-09 18:10:34 -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
e86c95818a
fix: added a return in lua command check
2021-05-20 05:36:00 -04:00
sammyette
08a3e75fd1
fix: check for lua defined commands before going to sh interp ( mvdan/sh#705 )
2021-05-19 18:39:56 -04:00
sammyette
d4a595d2a8
feat: run lua in sh interp exec handler
2021-05-19 18:38:15 -04:00
sammyette
14e6ae5a3c
feat: add command.not-found hook
2021-05-18 21:04:49 -04:00
sammyette
a655ff00ce
feat: use custom exec handler for sh interpreter
...
so, here we use a custom function for the sh interpreter to run
individual commands now. what does this mean?
1. aliases will work not only on the 1st command, since it was
replaced in the beginning before.
want to run `cmd; alias`? now you can!
2. custom error message when a command isnt found :} i can also
add the command.not-found hook (will do in next commit)
3. sh and lua can be mixed (not in this commit, but itll work)
this means all code for handling commands is in the single `execCommand`
function in shell.go and will probably able to clean things up soon,
ditching the `RunInput` function entirely
2021-05-18 20:49:55 -04:00
sammyette
e0851809ab
feat: make readline agnostic, add hilbiline to test
2021-05-17 19:03:56 -04:00
sammyette
1ff3ff854b
fix: add input to history before alias expansion
...
since im stupid, normal commands that are aliased add
the expanded version to the history, and not the alias itself.
lua alias was added since im dumb and did `input` instead of `cmdString`
so now, history is handled once, in main.go
2021-05-16 20:09:47 -04:00
sammyette
9415c5193e
feat(wip): check if lua input is incomplete
2021-05-16 15:50:49 -04:00
sammyette
0850247615
feat: recursively alias commands
2021-05-16 09:32:02 -04:00
sammyette
415e66ab9c
fix: trim prefix of alias instead of trim
2021-05-16 09:29:39 -04:00
sammyette
ad14b98b1f
feat: lua code can now be aliased
2021-05-16 08:43:19 -04:00
sammyette
83bcb35dcf
fix: remove unused imports
2021-05-16 06:58:48 -04:00
sammyette
dfb8ec9a90
fix: remove unused function
2021-05-16 06:55:11 -04:00
sammy
edd45e4182
fix: resplit input on alias
...
this makes it so itll properly check if the aliased *command* is
defined in lua
therefore, cd with an argument can be aliased now
2021-05-12 06:40:30 -04:00
sammy
0f9d3732fb
fix: check if type assertion of return value is valid
2021-05-11 19:00:07 -04:00
sammy
0ddfc5bea0
feat: allow command defined by commander to return exit code
2021-05-11 18:53:24 -04:00
sammy
e6382d454d
feat: add -n flag ( closes #47 )
2021-05-08 08:56:24 -04:00
sammy
9b3f8e818c
style: add space between binary op
2021-05-01 11:55:09 -04:00
sammy
e0cf87d272
refactor(minor): reduce the amount of module renaming
2021-04-28 18:57:28 -04:00
sammy
dc9bd1864c
chore: remove redundant module renaming
2021-04-28 18:52:42 -04:00
Devin Singh
4476a96eec
feat(wip): add appendpath
2021-04-28 16:57:06 -05:00
sammy
935bed3dc6
fix: switch back to readline for the time being
2021-04-23 23:42:34 -04:00
sammy
17e12c8c2a
chore: merge from master, resolve conflicts
2021-04-20 19:31:19 -04:00
sammy
bdc8c770e6
fix: aliases for lua commands
2021-04-20 19:26:33 -04:00
sammy
7b0b06d9bf
fix: dont make continue prompt input include a newline
2021-04-19 22:08:16 -04:00
Devin Singh
94f0ccf9f6
chore: formatting
2021-04-18 21:09:27 -05:00
sammy
e32639800e
fix: dont use readline at all
2021-04-18 15:41:37 -04:00
TorchedSammy
84d55a38b0
feat: change multiline prompt via multiprompt function ( closes #13 )
2021-04-05 18:09:21 -04:00
TorchedSammy
807ec15faa
fix: cleanup and move exit command to lua side
2021-04-05 15:21:44 -04:00
TorchedSammy
3cb3b34023
fix: add back sh, cleanup a bit and use new functions
2021-04-04 20:30:47 -04:00
TorchedSammy
cfdab00684
fix: make shell continue prompt "sh> "
2021-04-04 18:46:37 -04:00
TorchedSammy
cc183620c5
fix: move input checks to main.go, some cleanup
2021-04-04 18:42:56 -04:00
TorchedSammy
f4b45b370e
feat: multiline input with \ (hilbish only has lua input currently)
2021-04-04 13:04:57 -04:00
Jack
ad1be6b5f5
feat: Add command.exit signal to bait ( #15 )
2021-04-03 14:33:38 -04:00
TorchedSammy
4f4237a3e9
chore: split up go source files
2021-04-03 13:13:45 -04:00