如何仅使用 git bash 命令弹出 window? [Windows10]
How to pop up a window using just the git bash command? [Windows 10]
有谁知道 git bash 终端应该使用哪个命令来弹出 window?
假设我将我的目录从 ~ 更改为 Documents,我只需要一个命令来帮助我在屏幕上加载 Documents 文件夹视觉效果,而无需我单击鼠标。
我还想知道哪个 git bash 命令让 windows 10 到 return 所有 运行 过程。
如果你的意思是你想打开 bash 命令,你可以在 CMD 中使用这个命令,或者创建这个命令的快捷方式:
%ComSpec% /c ""C:\Program Files\Git\bin\bash.exe" --login -i"
%ComSpec%
is one of the environment variables used in DOS, OS/2 and Windows, which normally points to the command line interpreter, which is by default CMD.EXE
你要找的大概是
explorer .
它将在当前目录中打开 windows 文件资源管理器。
但是你不能使用
explorer /home
因为资源管理器只需要 windows 风格的路径。
我将它添加到我的 .bashrc
中,它读取传入的参数,并将其转换为 Windows 样式路径,并使用资源管理器打开它。
function open() {
pth=$(realpath "")
pth=$(echo $pth | sed -e 's/^\///' -e 's/\//\/g' -e 's/^./[=10=]:/')
explorer "$pth"
}
然后我运行open .
或open ~/some/path
(注意:您必须打开一个新终端 window 或 source ~/.bashrc
才能使用该命令)
有谁知道 git bash 终端应该使用哪个命令来弹出 window?
假设我将我的目录从 ~ 更改为 Documents,我只需要一个命令来帮助我在屏幕上加载 Documents 文件夹视觉效果,而无需我单击鼠标。
我还想知道哪个 git bash 命令让 windows 10 到 return 所有 运行 过程。
如果你的意思是你想打开 bash 命令,你可以在 CMD 中使用这个命令,或者创建这个命令的快捷方式:
%ComSpec% /c ""C:\Program Files\Git\bin\bash.exe" --login -i"
%ComSpec%
is one of the environment variables used in DOS, OS/2 and Windows, which normally points to the command line interpreter, which is by defaultCMD.EXE
你要找的大概是
explorer .
它将在当前目录中打开 windows 文件资源管理器。 但是你不能使用
explorer /home
因为资源管理器只需要 windows 风格的路径。
我将它添加到我的 .bashrc
中,它读取传入的参数,并将其转换为 Windows 样式路径,并使用资源管理器打开它。
function open() {
pth=$(realpath "")
pth=$(echo $pth | sed -e 's/^\///' -e 's/\//\/g' -e 's/^./[=10=]:/')
explorer "$pth"
}
然后我运行open .
或open ~/some/path
(注意:您必须打开一个新终端 window 或 source ~/.bashrc
才能使用该命令)