Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- green='\e[0;32m'
- GREEN='\e[0;32m'
- red='\e[0;31m'
- RED='\e[1;31m'
- blue='\e[0;34m'
- BLUE='\e[1;34m'
- cyan='\e[0;36m'
- CYAN='\e[1;36m'
- NC='\e[0m'
- [ -z "$PS1" ] && return
- HISTCONTROL=ignoredups:ignorespace
- shopt -s histappend
- HISTSIZE=1000
- HISTFILESIZE=2000
- shopt -s checkwinsize
- complete -cf sudo
- PROMPT_COMMAND='history -a'
- shopt -s cdspell
- shopt -s dirspell
- export EDITOR=vim
- TERM=xterm # лечим баг с тмуксом (ломает хоткеи прог, считая что это скрины)
- #---{функция, запускающаяся при выходе из оболочки}---
- function _exit()
- {
- echo -e "${CYAN}Bye, master :)${NC}"
- }
- trap _exit EXIT
- #-----------------------------------------------------
- clear
- # make less more friendly for non-text input files, see lesspipe(1)
- [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
- # set variable identifying the chroot you work in (used in the prompt below)
- if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
- debian_chroot=$(cat /etc/debian_chroot)
- fi
- # set a fancy prompt (non-color, unless we know we "want" color)
- case "$TERM" in
- xterm-color) color_prompt=yes;;
- esac
- [ -n "$SSH_CLIENT" ] && ps1_informer=" ${BLUE}[ssh]${NC}"
- [ -n "$RANGER_LEVEL" ] && ps1_informer=" (in ranger)"
- if [ $(id -u) -eq 0 ];
- then
- PS1="┌${RED}[\u]${NC} [\h]$ps1_informer:\[\e[0;32;49m\]\w\[\e[0m \n└>"
- else
- PS1="┌[${GREEN}\u${NC}] [\h]$ps1_informer:\[\e[0;32;49m\]\w\[\e[0m \n└>"
- fi
- # 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
- # internal func alias list ---------------
- alias un="unarchive $1"
- alias re="renamer"
- alias c="ssh_choose"
- #-----------------------------------------
- alias r='ranger'
- alias p='ps ax | grep -v grep | grep -i'
- alias ub='source ~/.bashrc'
- alias ip='curl ifconfig.me'
- #-work-------
- alias m='sudo mount -t cifs -o guest //192.168.233.10/pub /home/lord/GEKTOR'
- alias x='/home/lord/work'
- alias z='/home/lord/cisco'
- #------------
- #-progs mod--
- alias tmux='tmux attach || tmux new'
- alias mtr='mtr -gtk'
- alias b-sync='/home/lord/.b-sync/master.sh'
- alias grep='grep --color=auto'
- alias fgrep='fgrep --color=auto'
- alias egrep='egrep --color=auto'
- alias ls='ls --color=auto'
- #------------
- alias lvim='vim -u /home/lord/.lvim/vimrc'
- PATH=$PATH:$HOME/.rvm/bin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement