Bash-it环境,更快捷的bash配置

Bash-it

包含的东西有

  • autocompletion,
  • themes
  • aliases
  • custom functions
  • a few stolen pieces from Steve Losh
  • and more.

Bash-it安装

1.下载

git clone https://github.com/revans/bash-it.git ~/.bash_it

2.安装

~/.bash_it/install.sh

3.配置,只需要编辑

~/.bash_profile

Bash-it 帮助

下面是一些常用的帮助

bash-it show aliases # shows installed and available aliases bash-it show completions # shows installed and available completions bash-it show plugins # shows installed and available plugins bash-it help aliases # shows help for installed aliases bash-it help completions # shows help for installed completions bash-it help plugins # shows help for installed plugins

Bash-it安装问题

安装的时候遇到下面的问题

Please install argcomplete to use conda completion
Warning! PATH is not properly set up, '/Users/fdhuang/.rvm/gems/ruby-2.0.0-p353/bin' is not at first place,
         usually this is caused by shell initialization files - check them for 'PATH=...' entries, it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles', to fix temporarily in this shell session run: 'rvm use ruby-2.0.0-p353'.

sorry, the z plugin is incompatible with the fasd plugin. you may use either, but not both.

安装chruby

wget -O chruby-0.3.8.tar.gz https://github.com/postmodern/chruby/archive/v0.3.8.tar.gz tar -xzvf chruby-0.3.8.tar.gz cd chruby-0.3.8/
sudo make install

安装armcomplete

Please install argcomplete to use conda completion

这个问题可以用下面的命令来解决

sudo pip install argcomplete

bash-it 禁用z plugin

sorry, the z plugin is incompatible with the fasd plugin. you may use either, but not both.

这个就需要我们禁用z plugin

用bash-it的show plugins来显示插件的状态

bash-it show plugins
bash-it禁用z plugin
bash-it disable plugin z

重装安装rvm

Warning! PATH is not properly set up, '/Users/fdhuang/.rvm/gems/ruby-2.0.0-p353/bin' is not at first place, usually this is caused by shell initialization files - check them for 'PATH=...' entries, it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles', to fix temporarily in this shell session run: 'rvm use ruby-2.0.0-p353'.

最后这个问题就可以通过

  • installed ruby 2.1.0 again
  • removed it again
  • removed 2.0.0
  • reinstalled 2.0.0
还有一步是brew doctor,但是似乎会带来额外的问题。

转载于:https://my.oschina.net/quanpower/blog/307011

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值