unison-cli-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.Codebase.Editor.HandleInput.ProjectSwitch

Description

switch input handler

Synopsis

Documentation

projectSwitch :: ProjectAndBranchNames -> Cli () Source #

Switch to an existing project or project branch, with a flexible syntax that does not require prefixing branch names with forward slashes (though doing so makes the command unambiguous).

When the argument is ambiguous, when outside of a project, "switch foo" means switch to project "foo", not branch "foo" (since there is no current project). And when inside a project, "switch foo" means one of:

  1. Switch to project "foo", since there isn't a branch "foo" in the current project
  2. Switch to branch "foo", since there isn't a project "foo"
  3. Complain, because there's both a project "foo" and a branch "foo" in the current project