我有一个非常简单的 doskey 宏
DOSKEY s="C:\Program Files (x86)\Git\bin\sh.exe" --login
Run Code Online (Sandbox Code Playgroud)
所以我可以从命令提示符切换到 git shell s
但有时我只想在 shell 中执行一个命令并返回到命令行。为此,我要么必须进入 shell,做一些事情,然后退出。或者我可以修改 doskey 宏
DOSKEY s="C:\Program Files (x86)\Git\bin\sh.exe" --login -c "$*"
Run Code Online (Sandbox Code Playgroud)
但这意味着我现在不能用它来做前者,即进入shell,它只是现在执行。
我想知道我是否可以根据我是否已经通过另一个参数来有条件地在两者之间进行选择。所以s会做前者,但s echo hello会做后者。
有没有办法做到这一点?
是否可以删除每次启动时 Windows 上的 Git Bash 显示的问候消息?
Welcome to Git (version 1.8.1.2-preview20130201)
Run 'git help git' to display the help index.
Run 'git help <command>' to display help for specific commands.
Run Code Online (Sandbox Code Playgroud)