Reputation: 187
I installed Git For Windows 2.7.2 a few days ago. Now I have some problems with using optional tools Git For Windows
provides from cmd.exe
. In the previous version of Git For Windows
(or say msysgit
), I could configure these tools by modifying Git/etc/git-completion.bash
. For example:
alias ls='ls --show-control-chars --color=auto'
I used this way to make ls
display file names that contained Chinese characters normally. Now it seems this way doesn't work. In fact there is no git-completion.bash
under Git/etc/
. There is a git-completion.bash
under the folder Git/mingw64/share/git/completion
. I tried to copy it to Git/etc
and add the alias above, which didn't work either. These tools only works fine in Git Bash
. So how should I configure these tools together with git
to use them from cmd.exe
?
Upvotes: 0
Views: 42
Reputation: 2499
This answer explains why you no longer have this functionality. In short, msysgit provided a unix shell emulator, mingw. Git for Windows is git compiled in a Windows environment.
Therefore, ls
is simply an alias for dir
in a Windows shell, not mingw's ls
. If you want to create some Windows aliases, you can use doskey
. Here's an answer for that.
Alternatively, I would suggest that you just start using PowerShell, where you'll be able to set up the $profile
variable with some powerful commands like these.
Upvotes: 1