[英]New Windows 7 git install, missing commands in bins, e.g. alias for git bash
Just installed git on my Windows 7 laptop and desktop and it seems that some standard Unix commands are missing in the setup.刚刚在我的 Windows 7 笔记本电脑和台式机上安装了 git,似乎设置中缺少一些标准的 Unix 命令。 I'm new to Git and not that great with Windows stuff.
我是 Git 的新手,对 Windows 的东西不太好。
I found out the issue by trying to configure the git bash using a .bashrc
by adding a simple alias thus:我通过添加一个简单的别名尝试使用
.bashrc
配置 git bash 发现了这个问题:
alias ls 'ls -F'
When the .bashrc
is run (and it's getting executed when the shell starts), I get this message:当
.bashrc
运行时(并在 shell 启动时执行),我收到以下消息:
$ alias ls 'ls -F'
bash: alias: ls: not found
bash: alias: ls -F: not found
Upon closer examination of the bin directories ( /bin
, /usr/bin
, ie C:\\Program Files\\Git\\bin
and C:\\Program Files\\Git\\usr\\bin
, respectively) there is no alias
or alias.exe
.在仔细检查 bin 目录(
/bin
、 /usr/bin
,即C:\\Program Files\\Git\\bin
和C:\\Program Files\\Git\\usr\\bin
)后,没有alias
或alias.exe
。
I'm assuming this has something to do with Unix commands re-created into windows executable and not some branch of a path that I'm missing.我假设这与重新创建到 Windows 可执行文件中的 Unix 命令有关,而不是我缺少的某个路径分支。 I've checked on the path and cannot find some hidden bin directory.
我检查了路径,但找不到一些隐藏的 bin 目录。
I've seen several postings on installing Cygwin on it's own and I can do this but before launching into a protracted fix for both my laptop and desktop I'd like to know if I'm missing something or my git initial install is bad or if there's a package that I should be adding -- would appreciate any assistance.我已经看到了几个关于单独安装 Cygwin 的帖子,我可以做到这一点,但在为我的笔记本电脑和台式机启动长期修复之前,我想知道我是否遗漏了什么或者我的 git 初始安装是坏的还是如果有我应该添加的包 - 将不胜感激任何帮助。
The correct syntax would be:正确的语法是:
alias ls='ls -F'
alias is a bash builtin command , so you won't find an alias.exe anywhere in the git distribution. alias 是bash 内置命令,因此您不会在 git 发行版中的任何地方找到 alias.exe。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.