Coup de Grace

关于最近的fish 2.3.0 版本更新

刚才发现最近fish跟fisherman都更新了版本.配置大有不同~我各自重新配置了一次,可以分享下经验.

如果你已经安装过fish或者垃圾zsh,那么请在iTerm2中新建profiles,内含你喜欢的shell.

而后切换到/usr/local/bin/brew来手动进行以下的部分,因为默认shell挂掉cakebrew跟Terminal都无法启动.

brew install fish #安装fish
vim /etc/shells #添加/usr/local/bin/fish
chsh -s /usr/local/bin/fish #切换默认shell 
curl -Lo ~/.config/fish/functions/fisher.fish --create-dirs git.io/fisherman #安装fisherman

在这里我们暂停一下,安装方式依然是在functions中注册了一个fisher方法,但是实现就干净了很多.

这次将cache与插件都放置在更独立的位置,而且新增了fishfile的vundle安装插件方式.

通过fisher安装插件,如下的部分是我安装的:

其他命令:

fisher ls-remote #列出远程插件
fisher up #更新所有插件

目光切换到fish,我们的fish配置文件依然是~/.config/fish/config.fish:

如下是我的部分:

# alias
alias vim nvim
alias fishconfig "vim ~/.config/fish/config.fish"
alias vimconfig "vim ~/.vimrc"
alias cls "clear"
alias javac "javac -J-Dfile.encoding=utf8"
alias grep "grep --color=auto"
alias mvnec "mvn eclipse:clean eclipse:eclipse"
alias mvnpa "mvn clean package -Dmaven.test.skip=true"
alias mvnin "mvn clean install -Dmaven.test.skip=true"
alias mvnde "mvn deploy"
alias rm "/Users/Slahser/Documents/arsenal/sys/rm-trash/rm.rb"
#alias psg "ps aux | grep -v grep | grep -i --color"
#alias netp "netstat -tulanp"
alias tail "tail -f"
alias aria "aria2c --conf-path=/Users/Slahser/Documents/arsenal/aria2c/aria2.conf"
alias gitlog "git log --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
alias git hub
alias gsed /usr/local/opt/gnu-sed/libexec/gnubin/sed
alias flushdns "sudo killall -HUP mDNSResponder"
alias licenseidea "sudo /Users/Slahser/Documents/arsenal/IntelliJIDEALicenseServer\(0.0.0.0_1017\)/IntelliJIDEALicenseServer_darwin_386"
alias activator /Users/Slahser/Documents/arsenal/activator-dist-1.3.9/bin/activator
alias supserver "supervisord -c /Users/Slahser/Documents/arsenal/supervisor/supervisord.conf"
alias supclient "supervisorctl -c /Users/Slahser/Documents/arsenal/supervisor/supervisord.conf"

# proxy
set http_proxy http://127.0.0.1:9743/
set https_proxy http://127.0.0.1:9743/

# HOMES
set SOFA_HOME /Users/Slahser/Documents/arsenal/sofa-sdk
set JAVA_HOME `/usr/libexec/java_home -v 1.8.0_72`
set GROOVY_HOME /usr/local/opt/groovy/libexec
set M2_HOME /usr/local/Cellar/maven/3.3.9/libexec
set BREW_BIN /usr/local/sbin
set FLUME_HOME /Users/Slahser/Documents/arsenal/apache-flume-1.6.0

# HOLY_PATH
set -x PATH $PATH $BREW_BIN $SOFA_HOME $GROOVY_HOME $M2_HOME $JAVA_HOME $JENV_ROOT $FLUME_HOME

刚安装完的fisherman默认启动fish会有讨厌的欢迎语,我半年没配了..翻了好久才找到:

如下图,杀马特可以搞些土嗨的加进去.或者如图做一个干净的greeting:

而后我又安装了一些fish completion:

brew install homebrew/completions/brew-cask-completion

curl https://raw.githubusercontent.com/d42/fish-pip-completion/master/pip.fish --create-dirs -o ~/.config/fish/completions/pip.fish

curl https://raw.githubusercontent.com/jschneider/fish-maven-completion/master/mvn.fish --create-dirs -o ~/.config/fish/completions/mvn.fish

done.