-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better way to run installed tools on the terminal #98
Comments
I kept thinking about my suggestion and although it might work and make manually running installed tools more natural, it wouldn't make it any easier to run them from other places, like a
#!/bin/sh
GOBIN=${GOBIN:=$(go env GOBIN)}
if [ -z "$GOBIN" ]; then
GOBIN="$(go env GOPATH)/bin"
fi
TOOL="${GOBIN}/tool-v1.0.0"
$TOOL "$@"
export PATH="$PWD/.bingo/shims:$PATH" Now one could simply run |
Hi, same need here. Another user story: IDEs may want Maybe there is a similar way to do it for Go regarding the implementation on the IDE side: just test if there is a .bingo folder and then add the .bingo to the PATH or prefix binaries with it ... I see two main differences with the Python/Pipenv solution :
I don't plan for implementing that in vim-ale but I could submit an issue to ask for it (limited time on my side) once that would make sens for this project. Again, thank you for that program, that's a good way towards better Go dependency management. |
Hey, thanks for feedback! Looks like there are more and more opinions to add this (: Here is past discussion why it was not added: #52 (comment) All info is here: https://github.com/bwplotka/bingo#using-installed-tools Why |
Hi, first many thanks for this awesome tool, been using it for a while and it's a life saver. I completely agree with the notion of not including a I could install the tools using the I've created a draft of a tool called Could be used from command line or in //go:generate bingorun go-enum --marshal --nocase -f=$GOFILE Just post it here, to see if it's useful for someone else with this use case. |
Sourcing
.bingo/variables.env
and running$TOOL_NAME
work great on the terminal, but it's less intuitive than simply callingtool-name
, as it would be if the tool were installed withgo install
. This could be achieved by creating a shell function named after the tool, akin to what Python's virtualenv does withdeactivate
:@bwplotka I can send a PR if you think this is a valid idea.
On a slightly different note, the
.env
extension might lead people into thinking it's a plain dotenv file, when in fact it's a shell script. I myself tried to used it as a dotenv file with Task and it took me a few minutes to realized why it wasn't working.The text was updated successfully, but these errors were encountered: