Change working directory in shell with a python script

前端 未结 5 1314
遇见更好的自我
遇见更好的自我 2020-12-06 01:16

I want to implement a userland command that will take one of its arguments (path) and change the directory to that dir. After the program completion I would like the shell t

5条回答
  •  清歌不尽
    2020-12-06 01:50

    cd is exclusively(?) implemented as a shell internal command, because any external program cannot change parent shell's CWD.

提交回复
热议问题