[英]Bash - cd your instance rather than sub process
So I've created a bash script that takes argument and then (I want it to) cd me into a directory. 因此,我创建了一个带参数的bash脚本,然后(我希望它)将我cd到目录中。
It's not quite a case of cd /home/$1 for example, it's a bit more complex. 例如,它不是cd / home / $ 1的情况,它有点复杂。
The problem is (as I knew it would be) it's cding the sub process rather than my instance of bash. 问题是(正如我所知道的那样)它正在给子进程而不是我的bash实例添加代码。
Is there any way to apply it to my open bash? 有什么方法可以将其应用于我的公开bash吗?
I guess this is another option for you 我想这是您的另一选择
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.