-
Notifications
You must be signed in to change notification settings - Fork 12
Add support for configuring arbitrary command prefixes via environment variables #13
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
base: master
Are you sure you want to change the base?
Conversation
If you are using shin to always run some specific command, you can edit the | ||
`SHIN_DEFAULT_COMMAND`. It will append this to any bash shell you run. This environment | ||
variable can be set in your `~/.profile`, for example: | ||
|
||
```bash | ||
export SHIN_DEFAULT_COMMAND="cowsay" | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command for fish is:
set --export SHIN_DEFAULT_COMMAND="cowsay"
Which I have yet to test.
Thanks for the PR! Making the command interpreter configurable would indeed be a nice feature (see #7). Unfortunately, this PR isn't quite the right approach for several reasons:
In summary, a more sophisticated implementation is needed, probably in the form of a configuration file where multiple interpreters can be specified, and a UI to switch between them. But this would introduce a lot of complexity, and I'm honestly not convinced that would actually be worth it, to cover the relatively niche use cases I've seen so far. |
That's totally fair! My use case was to make this tool possible, which meant I just needed to pass the string to some command and return the value back. This PR enabled that, but isn't great if, say, you wanted to run |
Hey folks, I realized I wanted to be able to run ChatGPT commands from anywhere in my computer. I forked
shin
, made it configurable via environment variables, then wrote a short project for calling chat GPT (https://github.com/apockill/clai).Anyways, I figured other folks might benefit from this addition.