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. Managing environment and working directory:
21// shell := shell.NewShell(nil)
22// shell.SetEnv("MY_VAR", "value")
23// shell.SetWorkingDir("/tmp")
24// cwd := shell.GetWorkingDir()
25// 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