[英]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.