Guest User

Untitled

a guest
Oct 16th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. # ~/.bashrc: executed by bash(1) for non-login shells.
  2.  
  3. # If not running interactively, don't do anything
  4. [ -z "$PS1" ] && return
  5.  
  6. # don't put duplicate lines or lines starting with space in the history.
  7. # See bash(1) for more options
  8. HISTCONTROL=ignoreboth
  9.  
  10. # append to the history file, don't overwrite it
  11. shopt -s histappend
  12.  
  13. # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
  14. HISTSIZE=1000
  15. HISTFILESIZE=2000
  16.  
  17. # check the window size after each command and, if necessary,
  18. # update the values of LINES and COLUMNS.
  19. shopt -s checkwinsize
  20.  
  21. # If set, the pattern "**" used in a pathname expansion context will
  22. # match all files and zero or more directories and subdirectories.
  23. #shopt -s globstar
  24.  
  25. # set a fancy prompt (non-color, unless we know we "want" color)
  26. case "$TERM" in
  27. xterm-*color) color_prompt=yes;;
  28. esac
  29.  
  30. # uncomment for a colored prompt, if the terminal has the capability; turned
  31. # off by default to not distract the user: the focus in a terminal window
  32. # should be on the output of commands, not on the prompt
  33. #force_color_prompt=yes
  34.  
  35. if [ -n "$force_color_prompt" ]; then
  36. if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
  37. # We have color support; assume it's compliant with Ecma-48
  38. # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
  39. # a case would tend to support setf rather than setaf.)
  40. color_prompt=yes
  41. else
  42. color_prompt=
  43. fi
  44. fi
  45.  
  46. if [ "$color_prompt" = yes ]; then
  47. PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
  48. else
  49. PS1='\u@\h:\w\$ '
  50. fi
  51. unset color_prompt force_color_prompt
  52.  
  53. # If this is an xterm set the title to user@host:dir
  54. case "$TERM" in
  55. xterm*|rxvt*)
  56. PS1="\[\e]0;\u@\h: \w\a\]$PS1"
  57. ;;
  58. *)
  59. ;;
  60. esac
  61.  
  62. # enable color support of ls and also add handy aliases
  63. # GNU tools from MacPorts, to install run:
  64. # sudo port install coreutils +with_default_names
  65. if [ -x /opt/local/libexec/gnubin/dircolors ]; then
  66. alias dircolors=/opt/local/libexec/gnubin/dircolors
  67. test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
  68. alias ls='ls --color=auto'
  69. #alias dir='dir --color=auto'
  70. #alias vdir='vdir --color=auto'
  71.  
  72. alias grep='grep --color=auto'
  73. alias fgrep='fgrep --color=auto'
  74. alias egrep='egrep --color=auto'
  75. fi
  76.  
  77. # some more ls aliases
  78. alias ll='ls -alF'
  79. alias la='ls -A'
  80. alias l='ls -CF'
  81.  
  82. # Alias definitions.
  83. # You may want to put all your additions into a separate file like
  84. # ~/.bash_aliases, instead of adding them here directly.
  85.  
  86. if [ -f ~/.bash_aliases ]; then
  87. . ~/.bash_aliases
  88. fi
Add Comment
Please, Sign In to add comment