3// Example usage of the shell package:
5// 1. For one-off commands:
7// shell := shell.NewShell(nil)
8// stdout, stderr, err := shell.Exec(context.Background(), "echo hello")
10// 2. For maintaining state across commands:
12// shell := shell.NewShell(&shell.Options{
16// shell.Exec(ctx, "export FOO=bar")
17// shell.Exec(ctx, "echo $FOO") // Will print "bar"
19// 3. For the singleton persistent shell (used by tools):
21// shell := shell.GetPersistentShell("/path/to/cwd")
22// stdout, stderr, err := shell.Exec(ctx, "ls -la")
24// 4. Managing environment and working directory:
26// shell := shell.NewShell(nil)
27// shell.SetEnv("MY_VAR", "value")
28// shell.SetWorkingDir("/tmp")
29// cwd := shell.GetWorkingDir()
30// env := shell.GetEnv()
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list