bash: clean up
This commit is contained in:
parent
3c7b25f926
commit
b7560ff235
|
@ -1,6 +1,14 @@
|
||||||
|
# .bash_aliases
|
||||||
|
# (c) pcht 199x - 2017
|
||||||
alias ls='ls -F --color'
|
alias ls='ls -F --color'
|
||||||
alias l='ls -l'
|
alias l='ls -l'
|
||||||
alias d='ls -al | egrep ^d'
|
alias d='ls -al | egrep ^d'
|
||||||
alias dl='ls -al | egrep ^l'
|
alias dl='ls -al | egrep ^l'
|
||||||
alias ll='ls -al'
|
alias ll='ls -al'
|
||||||
alias sc=screen
|
alias sc=screen
|
||||||
|
alias h=history
|
||||||
|
alias td='todo -c --filter -done,+children'
|
||||||
|
alias tdall='todo --force-colour -A|less -r'
|
||||||
|
alias go=gnome-open
|
||||||
|
alias pp='python -mjson.tool'
|
||||||
|
# end .bash_aliases
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# Matthew's Git Bash Prompt
|
# .bash_prompt
|
||||||
|
#
|
||||||
|
# Matthew's Git Bash Prompt https://github.com/matthewmccullough/dotfiles
|
||||||
# +
|
# +
|
||||||
# python virtualenv
|
# python virtualenv
|
||||||
|
# +
|
||||||
|
# xterm dynamic title http://www.faqs.org/docs/Linux-mini/Xterm-Title.html#s2
|
||||||
|
#
|
||||||
|
# define PROMPT_COMMAND to prompt_func
|
||||||
########################################################################
|
########################################################################
|
||||||
RED="\[\033[0;31m\]"
|
RED="\[\033[0;31m\]"
|
||||||
YELLOW="\[\033[0;33m\]"
|
YELLOW="\[\033[0;33m\]"
|
||||||
|
@ -112,3 +118,4 @@ function prompt_func() {
|
||||||
}
|
}
|
||||||
|
|
||||||
PROMPT_COMMAND=prompt_func
|
PROMPT_COMMAND=prompt_func
|
||||||
|
# end .bash_prompt
|
||||||
|
|
46
.bashrc
46
.bashrc
|
@ -1,5 +1,5 @@
|
||||||
# bash start script
|
# .bashrc bash start script
|
||||||
# (c) Pcht
|
# (c) Pcht 2007-2017
|
||||||
|
|
||||||
# If not running interactively, don't do anything
|
# If not running interactively, don't do anything
|
||||||
[ -z "$PS1" ] && return
|
[ -z "$PS1" ] && return
|
||||||
|
@ -55,46 +55,24 @@ YELLOW="\[\033[1;33m\]"
|
||||||
WHITE="\[\033[1;37m\]"
|
WHITE="\[\033[1;37m\]"
|
||||||
DEFAULT_COLOR="\[\033[00m\]"
|
DEFAULT_COLOR="\[\033[00m\]"
|
||||||
|
|
||||||
## MADE in .bash_git
|
# very basic prompt -- more in .bash_prompt
|
||||||
# DEFAULT_PROMT_SEP="--"
|
PROMPT_COMMAND='PS1="[\u@\h] -- \w "; echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
|
||||||
# DEFAULT_PROMPT="$DEFAULT_COLOR[$YELLOW\u$DEFAULT_COLOR@$WHITE\h$DEFAULT_COLOR] $DEFAULT_PROMT_SEP $BROWN\w $DEFAULT_PROMT_SEP \t$DEFAULT_COLOR"
|
|
||||||
# export PS1="\`if [ \$? = 0 ];
|
|
||||||
# then
|
|
||||||
# echo -e '$? $GREEN$DEFAULT_PROMPT $GREEN :)\n$DEFAULT_PROMT_SEP\$$DEFAULT_COLOR ';
|
|
||||||
# else
|
|
||||||
# echo -e '$? $LIGHT_RED$DEFAULT_PROMPT $LIGHT_RED :(\n$DEFAULT_PROMT_SEP\$$DEFAULT_COLOR ';
|
|
||||||
# fi; \`"
|
|
||||||
|
|
||||||
# export PS1="${DEFAULT_COLOR}[${YELLOW}\u${DEFAULT_COLOR}@${WHITE}\h${DEFAULT_COLOR}] -- ${BROWN}\w ${DEFAULT_COLOR}-- \$ "
|
test -f ~/dotfiles/.bash_prompt && source ~/dotfiles/.bash_prompt
|
||||||
export PS1="${DEFAULT_COLOR}[${YELLOW}\u${DEFAULT_COLOR}@${WHITE}\h${DEFAULT_COLOR}] -- ${BROWN}\w ${DEFAULT_COLOR} "
|
|
||||||
|
|
||||||
# If this is an xterm set the title to user@host:dir
|
|
||||||
case "$TERM" in
|
|
||||||
xterm*|rxvt*)
|
|
||||||
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# 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 ]; then
|
|
||||||
. /etc/bash_completion
|
|
||||||
fi
|
|
||||||
|
|
||||||
# dircolors
|
# dircolors
|
||||||
# To create the file: dircolors -p
|
# To create the file: dircolors -p
|
||||||
if [ -f ~/.dircolors ]; then
|
if [ -f ~/dotfiles/.dircolors ]; then
|
||||||
eval "`dircolors ~/.dircolors`"
|
eval "`dircolors ~/dotfiles/.dircolors`"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# dhelp browser
|
# I love google-chrome :)
|
||||||
export BROWSER=google-chrome
|
export BROWSER=google-chrome
|
||||||
|
|
||||||
# aliases
|
# very min bash aliases
|
||||||
alias ls='ls -F --color'
|
alias ls='ls -F --color'
|
||||||
alias l='ls -l'
|
alias l='ls -l'
|
||||||
alias ll='ls -al'
|
alias ll='ls -al'
|
||||||
alias sc=screen
|
|
||||||
|
test -f ~/dotfiles/.bash_aliases && source ~/dotfiles/.bash_aliases
|
||||||
|
# end .bashrc
|
||||||
|
|
Loading…
Reference in New Issue