I am trying to make my shell cd into a directory. Is there a better way to do this? The only problem with this way is that my shell is a subprocess of the current shell. Making me have to exit twice.
package main
func main(){
err = syscall.Chdir(os.Getenv("HOME") + "/dev")
exitIfErr(err)
err = syscall.Exec(os.Getenv("SHELL"), []string{""}, os.Environ())
exitIfErr(err)
}