Skip to content

Add variable export mode #276

Open
Open
@alerque

Description

@alerque

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 evaled 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:

vcsh-switch () {
  eval $(vcsh export $1)
}

To be used thus:

$ vcsh-switch repo_name

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions