[英]How do I open git-bash.exe from command prompt such that it executes "git status" automatically and waits for the next command instead of exiting
我如何创建一个 git-bash 快捷方式来打开 git-bash.exe 并在启动时自动运行“git status”和/或“git worktree list”,然后等待我的下一个命令。 我努力了:
".\git-bash.exe" -c "git status"
但 git-bash window 在执行 git status 后立即关闭
".\git-bash.exe" -c "git status;read"
,但这样它运行 git 状态,等待回车键并关闭 git-bash window
在 git 命令退出后,您可以 append 命令“exec $SHELL”生成一个新的交互式 shell。 例如:
".\git-bash.exe" -c 'git status;exec $SHELL'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.