I am using the Git for Windows "git bash" command line on Windows and can't seem to find an equivalent in it for the open current directory command "cmd ." I can't find any documentation but if someone can point me to a list of commands for Git for Windows or let me know what the equivalent is I would appreciate it.
问题:
回答1:
Lets say I have a file called index.html and from the command line I want to use a command that would pull up this file up in sublime text which is my default text editor. How would I do that?
Simply define an alias (if you are in a CMD session, started with git-cmd.bat
.
In Windows, that would be:
doskey sbt=start "Sublime Text 3" "C:\path\to\Sublime_Text_x64\sublime_text.exe" $*
In a git bash shell:
alias sbt='"/c/path/to/SublimeText/sublime_text.exe"'
Then type sbt yourFile
, and it will open directly in Sublime Text.
回答2:
If you're using bash under Windows (whether it's installed via a Git installer, Cygwin, or something similar), you should be able to open the current directory in Windows Explorer by typing
cmd /c start .
cmd
is the Windows command line program. /c
tells it to use use the rest of the command line as a command to be executed. start
opens the specified argument; if it's a directory it opens it (by default) in Windows Explorer. You can also use this to open images, documents, and so forth.
回答3:
On my native Linux system you'd simply call
gnome-terminal .
or
konsole
or
xterm
I hope MySysGit supports at least one of these...