beam/examples/beamsh: 'chdir' changes the current directory
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
This commit is contained in:
parent
1794406033
commit
be7d4c5b8c
2 changed files with 6 additions and 0 deletions
|
@ -323,6 +323,8 @@ func GetHandler(name string) Handler {
|
||||||
return CmdOpenfile
|
return CmdOpenfile
|
||||||
} else if name == "spawn" {
|
} else if name == "spawn" {
|
||||||
return CmdSpawn
|
return CmdSpawn
|
||||||
|
} else if name == "chdir" {
|
||||||
|
return CmdChdir
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -436,3 +436,7 @@ func CmdOpenfile(args []string, stdout, stderr io.Writer, in beam.Receiver, out
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func CmdChdir(args []string, stdout, stderr io.Writer, in beam.Receiver, out beam.Sender) {
|
||||||
|
os.Chdir(args[1])
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue