1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

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:
Solomon Hykes 2014-04-04 17:30:03 -07:00
parent 6ce4d2c842
commit bc6303f15d
2 changed files with 6 additions and 0 deletions

View file

@ -323,6 +323,8 @@ func GetHandler(name string) Handler {
return CmdOpenfile
} else if name == "spawn" {
return CmdSpawn
} else if name == "chdir" {
return CmdChdir
}
return nil
}

View file

@ -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])
}