diff --git a/.bash_aliases b/.bash_aliases index b8d07c2..da97e20 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -1,6 +1,14 @@ +# .bash_aliases +# (c) pcht 199x - 2017 alias ls='ls -F --color' alias l='ls -l' alias d='ls -al | egrep ^d' alias dl='ls -al | egrep ^l' alias ll='ls -al' 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 diff --git a/.bash_prompt b/.bash_prompt index 1a8c064..a166f9f 100644 --- a/.bash_prompt +++ b/.bash_prompt @@ -1,9 +1,15 @@ #!/bin/bash ######################################################################## -# Matthew's Git Bash Prompt +# .bash_prompt +# +# Matthew's Git Bash Prompt https://github.com/matthewmccullough/dotfiles # + # 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\]" YELLOW="\[\033[0;33m\]" @@ -112,3 +118,4 @@ function prompt_func() { } PROMPT_COMMAND=prompt_func +# end .bash_prompt diff --git a/.bashrc b/.bashrc index 8473896..402620f 100755 --- a/.bashrc +++ b/.bashrc @@ -1,5 +1,5 @@ -# bash start script -# (c) Pcht +# .bashrc bash start script +# (c) Pcht 2007-2017 # If not running interactively, don't do anything [ -z "$PS1" ] && return @@ -55,46 +55,24 @@ YELLOW="\[\033[1;33m\]" WHITE="\[\033[1;37m\]" DEFAULT_COLOR="\[\033[00m\]" -## MADE in .bash_git -# DEFAULT_PROMT_SEP="--" -# 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; \`" +# very basic prompt -- more in .bash_prompt +PROMPT_COMMAND='PS1="[\u@\h] -- \w "; echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"' -# export PS1="${DEFAULT_COLOR}[${YELLOW}\u${DEFAULT_COLOR}@${WHITE}\h${DEFAULT_COLOR}] -- ${BROWN}\w ${DEFAULT_COLOR}-- \$ " -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 +test -f ~/dotfiles/.bash_prompt && source ~/dotfiles/.bash_prompt # dircolors # To create the file: dircolors -p -if [ -f ~/.dircolors ]; then - eval "`dircolors ~/.dircolors`" +if [ -f ~/dotfiles/.dircolors ]; then + eval "`dircolors ~/dotfiles/.dircolors`" fi -# dhelp browser +# I love google-chrome :) export BROWSER=google-chrome -# aliases +# very min bash aliases alias ls='ls -F --color' alias l='ls -l' alias ll='ls -al' -alias sc=screen + +test -f ~/dotfiles/.bash_aliases && source ~/dotfiles/.bash_aliases +# end .bashrc