linux - 有没有办法让我自己的 sh 函数在 linux 终端中变为 "carry around",而不必在我连接的任何地方安装文件?

标签 linux shell terminal

我想在连接到终端时无论走到哪里,都可以使用相同的自定义命令。有办法吗?

最佳答案

在 bash 中,过去可以使用 exported functions 来做到这一点,最终进入环境。它出现了you could use this against CGI-based web services ,并且通过 SSH,针对许多 Git 托管解决方案,因此此功能在 bash 中受到严格限制。

因此,我认为您的要求不再可能,至少在不重新配置 SSH 服务器并可能修补其源代码的情况下是不可能的。

关于linux - 有没有办法让我自己的 sh 函数在 linux 终端中变为 "carry around",而不必在我连接的任何地方安装文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52552456/

相关文章:

linux - 文件所有权不会停留在 git 分支更改上

bash - 如何找到深度最小的目录?

python-3.x - 如何通过手机号码获取IP地址?

linux - 如何将我的输入 token 传递给 zsh 别名中的嵌套命令

linux - rabbitmq-server : Depends: socat but it is not going to be installed. 无法安装rabbitMQ

linux - linux下perl的基本聊天系统

windows - 如何从 Emacs 中运行 Cygwin Bash Shell?

php - 在Mac OS上的Dockerized PHP中使用XDebug

java - 在 OSX 中打开终端并启动 .jar 的文件?

json - 如何从heroku下载一些文件