State Synchronization
Shannon keeps your environment variables and working directory in sync across mode switches.
Environment Variables
[bash] ~/project > export API_KEY="sk-1234"
[bash] ~/project > <Shift+Tab>
[nu] ~/project > $env.API_KEY
sk-1234
It works both ways:
[nu] ~/project > $env.FOO = "hello"
[nu] ~/project > <Shift+Tab>
[bash] ~/project > echo $FOO
hello
Typed Value Conversion
Nushell stores some env vars as typed values (PATH is a list, not a string). Shannon handles this automatically:
- Nu to Brush:
env_to_strings()converts typed values to strings usingENV_CONVERSIONSto_stringclosures - Brush to Nu: String env vars are written back. Nushell automatically
applies
from_stringconversions on the next REPL iteration
You don’t need to do anything — PATH, LS_COLORS, and other typed vars just work.
Working Directory
[bash] ~/project > cd /tmp
[bash] /tmp > <Shift+Tab>
[nu] /tmp >
The Strings-Only Boundary
Only exported environment variables and the cwd cross between modes. Internal shell state does not transfer:
- Nushell variables (
let x = 5) stay in nushell - Bash local variables and aliases stay in bash
- Use
export/$env.X = ...for values that need to cross