——————————————————————————文字彩色——————————————————————————————
我下载之后发现和我打开系统默认的终端效果是一样的啊~应该怎么调整呢?
我是依照这个做的修改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,可以快速实现全屏与正常窗口大小的切换,非常方便。