text 〜/ .bashrc配置OS X.

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 〜/ .bashrc配置OS X.相关的知识,希望对你有一定的参考价值。

# ~/.bashrc: executed by bash(1) for non-login shells.

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

#The first line will tell Bash to ignore duplicated and empty history entries.
#The second line will merge the history of multiple open sessions 
#(e.g. in multiple tabs or windows).
export HISTCONTROL=ignoreboth
shopt -s histappend
# After each command, save and reload history
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# colors (ls etc)
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced

# some aliases
#alias ll='ls -alF'
#alias la='ls -A'
#alias l='ls -CF'
alias cd..='cd ../'                         # Go back 1 directory level (for fast typers)
alias ..='cd ../'                           # Go back 1 directory level
alias ...='cd ../../'                       # Go back 2 directory levels
alias .3='cd ../../../'                     # Go back 3 directory levels
alias .4='cd ../../../../'                  # Go back 4 directory levels
alias .5='cd ../../../../../'               # Go back 5 directory levels
alias .6='cd ../../../../../../'            # Go back 6 directory levels
alias f='open -a Finder ./'                 # f:            Opens current directory in MacOS Finder
alias ~="cd ~"                              # ~:            Go Home
#alias c='clear'   

# Add an "alert" alias for long running commands.  Use like so:
#   sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
    . /etc/bash_completion
fi
# Only for Mac OS X, where .bashrc is otherwise ignored
if [ -f ~/.bashrc ]; then
        source ~/.bashrc
fi

以上是关于text 〜/ .bashrc配置OS X.的主要内容,如果未能解决你的问题,请参考以下文章

markdown 键盘仅OS X.

css 字体平滑OS X.

css 只是对Pinboard.in的修改,灵感来自Brett Terpstra。最适合OS X.

sh shell函数用于在shell脚本中进行波浪扩展。适用于Linux和OS X.

.inputrc(Mac OS X)/.bashrc(Linux)

ubuntu系统怎么配置环境变量