-
Notifications
You must be signed in to change notification settings - Fork 124
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
Add variable export mode #276
Comments
Historical context: The earliest versions of vcsh allowed both being sourced and executed; which broke down trying to support Bash and Zsh at once. The overhead of execution is neglible.
|
I saw #75 re The bash vs. zsh vs. foo thing should be a pretty much non issue if all that is involved is exporting some ENV vars. Whatever is being done along those lines already works across shells. I'll have to review my own old use case for this. I know I scripted around it and it might not be important, but I do remember this being a pain point and thought it worth extracting from the other issue and reviewing on its own. |
Aye, NP. So let's keep As to Zsh/Bash/Posix: The early versions could be sourced and executed with the same codebase. Took some hacks, but was fun while it lasted :p |
Extracted from #248...
There are some cases where instead of opening a new shell using
vcsh enter ...
it would actually be more useful to setup the current shell for use with Git tooling connected to a VCSH repository.Since it's impossible to manipulate the parent process environment the implementation for this would have to do what everybody else does: dump code that can be
eval
ed in the parent shell. Usage might look like:$ eval $(vcsh export repo_name)
This could be wrapped in a shell function in the user's profile something like this:
To be used thus:
$ vcsh-switch repo_name
The text was updated successfully, but these errors were encountered: