白夜瞭望

夢の中の夢
うつし世はゆめ 夜の夢こそまこと
  1. 首页
  2. Linux技术
  3. 正文

OhMyZsh自定义设置

2019年4月2日 6922点热度 0人点赞 0条评论

Contents

安装OnMyZsh

首先你得装zsh。

# Ubuntu:
sudo apt install zsh
# Archlinux:
sudo pacman -S zsh

然后就可以装ohmyzsh这个优化整合包了,官方提供的一键脚本:

sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

设置常用插件

plugins=(
  git
  archlinux
  autojump
  go
  python
  systemd
  torrent
  vi-mode
  extract  #解压缩文件, x filename即可。
  zsh-proxy # git clone https://github.com/sukkaw/zsh-proxy.git ~/.oh-my-zsh/custom/plugins/zsh-proxy
  zsh-autosuggestions  # 类Fish的自动提示插件,需要自行安装。
)

安装插件 zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

安装设置插件 oh-my-zsh-proxy-plugin

git clone https://github.com/escalate/oh-my-zsh-proxy-plugin.git "$HOME/.oh-my-zsh/custom/plugins/proxy"
mkdir $HOME/.proxy 
echo "http://127.0.0.1:10800" > $HOME/.proxy/http_proxy
echo "http://127.0.0.1:10800" > $HOME/.proxy/https_proxy
echo "http://127.0.0.1:10800" > $HOME/.proxy/ftp_proxy
echo "http://127.0.0.1:10800" > $HOME/.proxy/rsync_proxy
echo "" > $HOME/.proxy/no_proxy

让设置文件支持多个类Unix系统

case `uname` in
  Darwin)
    # commands for OS X go here
  ;;
  Linux)
    # commands for Linux go here
  ;;
  FreeBSD)
    # commands for FreeBSD go here
  ;;
esac
本作品采用 知识共享署名 4.0 国际许可协议 进行许可
标签: 暂无
最后更新:2020年6月4日

bai

文案为生的业余画师,偶尔客串程序员。

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

Copyright © 2022 yumenaka.net All Rights Reserved.

Theme Kratos Made By Seaton Jiang