Closed TorchedSammy closed 2 years ago
Go on windows is pretty cancer, and the readline lib is pretty unit specific. No promises, but I’ll experiment with getting it to build at least. Are there any ways to branch code based on platform in go?
also golang :kek:
Are there any ways to branch code based on platform in go
you can have build constraints which means a file will only be built if its for platform
there's also runtime.GOOS
so you can do os check at runtime
So current options for a platform readline lib: https://github.com/chzyer/readline: seemingly very low level, pita to implement existing stuffs, completions will be hell (maybe mooch off preexisting completion methods?), possibility to make something pretty good with enough work https://github.com/lmorg/readline: seemingly limited api, seems to be crossplatform but doesn't show any examples I think the first one would be a better choice, but then again i would need to learn golang
the second has an example here: https://github.com/lmorg/readline/tree/master/examples/01-getting-started i think this would be a better choice, i already considered 1st in the past while doing v0.1 and yeah completions will be hell
i meant examples of cross platform stuff, but im guessing it does from the file names. Ill try to work this into the existing stuff so we dont give up any functionality
tab complete doesn't complete the line unless the user presses enter might as well just make a custom line editor
I thought this provided tab completions? https://github.com/lmorg/readline/blob/master/tab.go
tab -> get entry -> hit enter
jesus christ
milestone hell to get this on track again, hilbish itself already works fine on windows (i added some windows specific checks, runtime paths, etc) but all that is missing is an accessible and good line editor.
i realized that readline is also gpl so moving away from that completely would be great and a pure go library means cross compile and faster compiles. prevously mentioned libraries dont work for us (or any i found) so seems only option is to roll our own
expected to come with the 0.8 release which will change to the pure go readline library
will close for 1.0
finally
hilbish isnt tested on windows, since i don't have an install of it and don't want to bother getting it just to test. the only problems seem to be the readline library dependency and hardcoded linux paths