Blog

Blog

PHODAL

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

偶然间在闲逛的时候,发现了bash-it,一个社区的bash框架。。

A community bash framework.

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-itshow 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,但是似乎会带来额外的问题。

关于我

Github: @phodal     微博:@phodal     知乎:@phodal    

微信公众号(Phodal)

围观我的Github Idea墙, 也许,你会遇到心仪的项目

QQ技术交流群: 321689806

新书《全栈应用开发:精益实践》

这不是一本深入前端、后台、运维、设计、分析等各个领域的书籍。本书以实践的方式,将这一系列的领域及理论知识结合到一起,来帮助读者构建全栈Web 开发的知识体系,并辅以精益及敏捷的思想,来一步步开发Web 应用:从创建一个UI 原型到编写出静态的前端页面;从静态的前端页面到带后台的应用,并部署应用;从Web 后台开发API 到开发移动Web 应用。在这个过程中,我们还将介绍一些相辅相成的步骤:使用构建系统来加速Web 应用的开发;为应用添加数据分析工具来改进产品;使用分析工具来改善应用的性能;通过自动化部署来加快上线流程;从而帮助读者开发出一个真正可用的全栈 Web 应用。同时,我们也将帮助读者把这些步骤应用到现有的系统上,改进现有系统的开发流程。

comment

Feeds

RSS / Atom

最近文章

关于作者

Phodal Huang

Developer, Consultant, Writer, Designer

ThoughtWorks 高级咨询师

工程师 / 咨询师 / 作家 / 设计学徒

开源深度爱好者

出版有《前端架构:从入门到微前端》、《自己动手设计物联网》、《全栈应用开发:精益实践》

联系我: h@phodal.com

微信公众号: 与我沟通

标签