met*_*lid 7 windows cygwin zsh oh-my-zsh windows-8
我已经在 Windows 8.1 上安装了 Cygwin 现在我想在 cygwin 中安装 ZSH 和 Oh My ZSH。
我通过在 Select 屏幕中选择 Shells > Zsh 在其中安装了 ZSH。
我找到了这个链接来安装Oh my ZSH但是当我在这个页面上运行给定的命令时
wget --no-check-certificate https://raw.github.com/haithembelhaj/oh-my-cygwin/master/oh-my-cygwin.sh -O -
Run Code Online (Sandbox Code Playgroud)
我得到这个输出
Jitendra Vyas@JitendraVyas ~
$ wget --no-check-certificate https://raw.github.com/haithembelhaj/oh-my-cygwin/ master/oh-my-cygwin.sh -O -
--2013-11-06 22:49:50-- https://raw.github.com/haithembelhaj/oh-my-cygwin/maste r/oh-my-cygwin.sh
cygwin warning:
MS-DOS style path detected: E:\RailsInstaller\cacert.pem
Preferred POSIX equivalent is: /cygdrive/e/RailsInstaller/cacert.pem
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Resolving raw.github.com... 103.245.222.133
Connecting to raw.github.com|103.245.222.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 826 [text/plain]
Saving to: `STDOUT'
0% [ ] 0 --.-K/s # !/bin/bash
# install apt-cyg
wget --no-check-certificate https://github.com/john-peterson/apt-cyg/raw/path/ap t-cyg
chmod +x apt-cyg
mv apt-cyg /bin/apt-cyg
# install some stuff like vim and git
apt-cyg install zsh mintty vim curl git openssh git-completion git-gui gitk
#setting up vim
cp /usr/share/vim/vim73/vimrc_example.vim ~/.vimrc
# Create initial /etc/zshenv
[[ ! -e /etc/zshenv ]] && echo export PATH=/usr/bin:\$PATH > /etc/zshenv
# install OH MY ZSH
/usr/bin/env git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]
then
cp ~/.zshrc ~/.zshrc.orig;
rm ~/.zshrc;
fi
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
# setting up zsh as default
sed -i "s/$USER\:\/bin\/bash/$USER\:\/bin\/zsh/g" /etc/passwd
# et voila just start it
/usr/bin/env zsh
100%[======================================>] 826 --.-K/s in 0.09s
2013-11-06 22:49:51 (8.64 KB/s) - written to stdout [826/826]
Run Code Online (Sandbox Code Playgroud)
但我没有看到这个屏幕
mpy*_*mpy 12
由于源页面上缺少换行符,您错过了安装命令中最重要的部分:sh
. 完整的命令应该是
wget --no-check-certificate https://raw.github.com/haithembelhaj/oh-my-cygwin/master/oh-my-cygwin.sh -O - | sh
Run Code Online (Sandbox Code Playgroud)
鉴于此,写作stdout
完全有意义。
但是,最好始终小心,不要盲目地将未知脚本通过管道传输到sh
. 相反,您可以将命令下载到文件中install.sh
wget --no-check-certificate https://raw.github.com/haithembelhaj/oh-my-cygwin/master/oh-my-cygwin.sh -O install.sh
Run Code Online (Sandbox Code Playgroud)
然后,检查它在做什么(less install.sh
)然后才执行它
sh install.sh
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
35479 次 |
最近记录: |