-
-
Save Ran-Xing/0e47c9b793887d201bab9de2a07a740c to your computer and use it in GitHub Desktop.
| #!/usr/bin/env bash | |
| sudo apt-get -qq install util-linux zsh git wget -y | |
| sudo yum install util-linux zsh git wget -y | |
| brew install zsh git wget | |
| sudo chsh -s /bin/zsh | |
| opkg install zsh git git-http | |
| GH_DOMAIN="${GH_DOMAIN:-ghfast.top}" | |
| if curl -s -m 5 -o /dev/null -w "%{http_code}" www.google.com | grep -q "200"; then | |
| ghtype=false | |
| ghproxy="https:/" | |
| echo "\ny\n" | zsh -c "$(curl -fsSL ${ghproxy}/raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
| else | |
| ghproxy="https://${GH_DOMAIN}/https:/" | |
| ghtype=true | |
| echo "\ny\n" | zsh -c "$(curl -fsSL ${ghproxy}/raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh | sed -e "s|https://github.com|${ghproxy}/github.com|g; s|https://raw.githubusercontent.com|${ghproxy}/raw.githubusercontent.com|g")" | |
| fi | |
| git clone ${ghproxy}/github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting | |
| git clone ${ghproxy}/github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | |
| if [ "$ghtype" == false ]; then | |
| exit | |
| fi | |
| if [ "$(uname)" == "Darwin" ]; then | |
| sed -i "" "s|https://mirror.ghproxy.com/||g" ${ZSH}/.git/config | |
| sed -i "" "s|https://mirror.ghproxy.com/||g" ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting/.git/config | |
| sed -i "" "s|https://mirror.ghproxy.com/||g" ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions/.git/config | |
| sed -i "" "s/plugins=(git)/plugins=(git zsh-syntax-highlighting zsh-autosuggestions docker kubectl brew golang history nmap node npm pip pipenv pyenv pylint python screen sublime)/g" ~/.zshrc | |
| elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then | |
| sed -i "s|https://mirror.ghproxy.com/||g" ${ZSH}/.git/config | |
| sed -i "s|https://mirror.ghproxy.com/||g" ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting/.git/config | |
| sed -i "s|https://mirror.ghproxy.com/||g" ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions/.git/config | |
| sed -i "s/plugins=(git)/plugins=(git zsh-syntax-highlighting zsh-autosuggestions docker kubectl brew golang history nmap node npm pip pipenv pyenv pylint python screen sublime)/g" ~/.zshrc | |
| elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then | |
| echo Windows 请自行替换 | |
| fi | |
| source ~/.zshrc |
RUN curl -s https://ghfast.top/https://gist.githubusercontent.com/Ran-Xing/0e47c9b793887d201bab9de2a07a740c/raw/92db8e58ccd343d31def7cc8eb07ac0a22a7501c/zsh_init.sh | bash || echo "ok!"RUN curl -s https://gist.githubusercontent.com/Ran-Xing/0e47c9b793887d201bab9de2a07a740c/raw/92db8e58ccd343d31def7cc8eb07ac0a22a7501c/zsh_init.sh | bash || echo "ok!"All Plug
1password adb ag aliases alias-finder ansible ant apache2-macports arcanist archlinux asdf autoenv autojump autopep8 aws battery bazel bbedit bedtools bgnotify bower branch brew bundler cabal cake cakephp3 capistrano cargo cask catimg celery charm chruby chucknorris cloudfoundry codeclimate coffee colemak colored-man-pages colorize command-not-found common-aliases compleat composer copybuffer copydir copyfile copypath cp cpanm dash debian deno dircycle direnv dirhistory dirpersist dnf dnote docker docker-compose docker-machine doctl dotenv dotnet droplr drush eecms emacs ember-cli emoji emoji-clock emotty encode64 extract fabric fancy-ctrl-z fasd fastfile fbterm fd fig firewalld flutter fnm forklift fossil frontend-search fzf gas gatsby gb gcloud geeknote gem genpass gh git git-auto-fetch git-escape-magic git-extras gitfast git-flow git-flow-avh github git-hubflow gitignore git-lfs git-prompt glassfish globalias gnu-utils golang gpg-agent gradle grails grc grunt gulp hanami helm heroku history history-substring-search hitchhiker hitokoto homestead httpie invoke ionic ipfs isodate istioctl iterm2 jake-node jenv jfrog jhbuild jira jruby jsontools juju jump kate keychain kitchen kn knife knife_ssh kops kubectl kubectx kube-ps1 lando laravel laravel4 laravel5 last-working-dir lein lighthouse lol lpass lxd macos macports magic-enter man marked2 mercurial meteor microk8s minikube mix mix-fast mongocli mosh multipass mvn mysql-macports n98-magerun nanoc ng nmap node nomad npm npx nvm oc octozen operator-sdk osx otp pass paver pep8 percol per-directory-history perl perms phing pip pipenv pj please pm2 pod poetry postgres pow powder powify profiles pyenv pylint python rails rake rake-fast rand-quote rbenv rbfu rbw react-native rebar redis-cli repo ripgrep ros rsync ruby rust rustup rvm safe-paste salt samtools sbt scala scd screen scw sdk sfdx sfffe shell-proxy shrink-path singlechar spring sprunge ssh-agent stack sublime sublime-merge sudo supervisor suse svcat svn svn-fast-info swiftpm symfony symfony2 systemadmin systemd taskwarrior terminitor term_tab terraform textastic textmate thefuck themes thor tig timer tmux tmux-cssh tmuxinator toolbox torrent transfer tugboat ubuntu ufw universalarchive urltools vagrant vagrant-prompt vault vim-interaction vi-mode virtualenv virtualenvwrapper volta vscode vundle wakeonlan wd web-search wp-cli xcode yarn yii yii2 yum z zbell zeus zoxide zsh-interactive-cd zsh-navigation-tools
sudo apt-get -qq install util-linux zsh git wget -y
sudo yum install util-linux zsh git wget -y
brew install zsh git wget
sudo chsh -s /bin/zsh
zsh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
sed -i "s/plugins=(git)/plugins=(git zsh-syntax-highlighting zsh-autosuggestions docker kubectl brew golang history nmap node npm pip pipenv pyenv pylint python screen sublime)/g" ~/.zshrc
source ~/.zshrc
curl -s https://ghfast.top/https://gist.githubusercontent.com/Ran-Xing/0e47c9b793887d201bab9de2a07a740c/raw/92db8e58ccd343d31def7cc8eb07ac0a22a7501c/zsh_init.sh | bash -curl -s https://gist.githubusercontent.com/Ran-Xing/0e47c9b793887d201bab9de2a07a740c/raw/92db8e58ccd343d31def7cc8eb07ac0a22a7501c/zsh_init.sh | bash -