Open boundedinfinity opened 5 years ago
Using find
is a possibility, however this should probably only use shells that are in the $PATH. So using the normal which
or type
commands may be a better fit here, or maybe there is some built-in go library that already does this.
@boundedinfinity ok sounds good, I'll throw something basic together that works, and then maybe we can discuss refactor in a manner that identifies a design pattern you may have in mind. IE: what package, what files... ect.
@boundedinfinity I was able to build the docker image, however, I had to un.gitignore the ./system/ab0x.go
file so the CLI could import the ReadFile()
function.. I feel like that's something that's not intended so maybe some insight on why we're ignoring that file in the first place would be helpful.
Pushed on a separate branch for now and can be found here
@berryhill k, do what you need to do to test things, and we can fix it later, for this issue, if i understand things correctly (not having looked through the code yet), you'll need to run the go generate
command inside the container, which generates that file (which is the reason that it is in the .gitignore file).
The docker file should also probably just run the make build target.
I haven't looked through your whole structure yet, but I think that should do the trick. and if you cant run the stuff from the make file for now, just run go generate
, then go build
or go install
.
The initialization should detect the shells that are installed before attempting to initialize the structure for that shell. For example if the system doesn't have the fish shell installed, then it shouldn't attempt to initialized the fish shell directories.