——————————————————————————文字彩色——————————————————————————————
我下載之后發現和我打開系統默認的終端效果是一樣的啊~應該怎么調整呢?
我是依照這個做的修改http://blog.csdn.net/sanwuhai/article/details/31357037
我搜了下,做了如下配置
1.修改了~/.bash_profile
插入了如下內容
export CLICOLOR=1
export LSCOLORS=gxfxcxdxbxegedabagacad
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$ '
export TERM=xterm-color
2.將Preferences->Profiles->Terminal->Terminal Emulation下的Report Terminal Type
設置為了xterm-256color
注:Mac 的 bashrc,使其永久生效。
1、根據這篇文章:
http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html
簡單的說就是:
.bash_profile is executed for login shells, while .bashrc is executed for interactive non-login shells.
Mac OS X — an exception
An exception to the terminal window guidelines is Mac OS X’s Terminal.app, which runs a login shell by default for each new terminal window, calling .bash_profile instead of .bashrc. Other GUI terminal emulators may do the same, but most tend not to.
而糟糕的是,MAC是一個例外,它會執行bash_profile,但不會去管.bashrc
===============================
2、好了,解決方案是
編輯一下.bash_profile:
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
===============================
3、加上最需要的兩個命令
alias ll='ls -lG'
alias ls='ls -G'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
export PATH="/usr/local/share/npm/bin:$PATH"
export NODE_PATH=/usr/local/share/npm/lib/node_modules
export PYTHONPATH=/usr/local/lib/python3.3/site-packages
一個是ll,因為用習慣了centos所以ll很好用,ls也加上color。剩下的是兩個PATH 將其添加到bashrc中就行了
——————————————————————————幾個技巧及快速打開——————————————————————————————
轉自:http://m.blog.csdn.net/blog/index?username=CHENYUFENG1991
【1.選中即復制】
在iTerm2中,直接用鼠標選中某個單詞或者一行命令,那么就已經被復制了。不需要在去按command+C命令了。
【2.屏幕分隔】
這個是我最喜歡的iTerm2的功能,分隔成多個屏幕,只要你電腦的屏幕足夠大,想分多少個屏幕都可以。可以同時進行命令行操作,而不會像只有在一個屏幕時,因為一個命令或者網絡下載阻塞了,而不能執行其他命令了。如果你同時想去執行很多命令,那么,do it.
command+d:垂直分割;
command+shift+d:水平分割
。
【3.快速喚出】
這個同樣是我很喜歡的功能,炫酷到無法阻擋。設置好系統熱鍵之后,只要按快捷鍵,iTerm2就會從頂部以半透明的形式快速喚出,相當炫酷高效。個人因為經常使用iTerm2,所以設置了熱鍵為:option+空格鍵。大家也可以根據自己的喜好設置快捷鍵。
。
使用快捷鍵快速喚出的效果。。。貌似是直接浮動在窗口上的,我截不了屏。。。大家嘗試去感受下。
【4.顯示復制歷史】
使用快捷鍵shift+command+h,快速顯示出我復制過的歷史記錄,你可以快速選擇使用。
。
【5.全屏切換】
command+enter,可以快速實現全屏與正常窗口大小的切換,非常方便。