dotfiles

changeset 5:f8789f33df8c

aliases -> functions in bashrc; minor changes in bashrc & inputrc
author meillo@marmaro.de
date Wed, 05 Sep 2007 00:21:17 +0200
parents 68dd6ae11835
children d7884728e836
files .bashrc .inputrc
diffstat 2 files changed, 59 insertions(+), 34 deletions(-) [+]
line diff
     1.1 --- a/.bashrc	Tue Sep 04 22:04:31 2007 +0200
     1.2 +++ b/.bashrc	Wed Sep 05 00:21:17 2007 +0200
     1.3 @@ -11,50 +11,48 @@
     1.4  # If not running interactively, don't do anything:
     1.5  [ -z "$PS1" ] && return
     1.6  
     1.7 +
     1.8  # check the window size after each command and, if necessary,
     1.9  # update the values of LINES and COLUMNS.
    1.10  shopt -s checkwinsize
    1.11  
    1.12 +
    1.13  # enable colored ls output
    1.14  eval "`dircolors -b $HOME/.dircolorsrc`"
    1.15  
    1.16 +
    1.17  # one history for all
    1.18  shopt -s histappend
    1.19  PROMPT_COMMAND='history -a'
    1.20 +export HISTCONTROL=ignoredups
    1.21 +# larger history
    1.22 +export HISTSIZE=100000
    1.23 +export HISTFILESIZE=$HISTSIZE
    1.24  
    1.25 -# command prompt
    1.26 -PS1='\033[01;31m<\033[00m \h \033[01;31m|\033[00m \u \033[01;31m|\033[00m \w \033[01;31m>\033[00m\n    \$ '
    1.27 +
    1.28 +# enable programmable completion features (you don't need to enable
    1.29 +# this, if it's already enabled in /etc/bash.bashrc and /etc/profiles
    1.30 +# sources /etc/bash.bashrc).
    1.31 +if [ -f /etc/bash_completion ]; then
    1.32 +    . /etc/bash_completion
    1.33 +fi
    1.34 +
    1.35  
    1.36  # If this is an xterm set the title to user@host:dir
    1.37  case "$TERM" in
    1.38  xterm*|rxvt*)
    1.39 -    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
    1.40 +    PROMPT_COMMAND=$PROMPT_COMMAND' ; echo -ne "\033]0;title---${USER}@${HOSTNAME}: ${PWD}\007"'
    1.41 +    ;;
    1.42 +screen*)
    1.43 +    PROMPT_COMMAND=$PROMPT_COMMAND' ; echo -ne "\033]0;screen---${USER}@${HOSTNAME}: ${PWD}\007"'
    1.44      ;;
    1.45  *)
    1.46      ;;
    1.47  esac
    1.48  
    1.49  
    1.50 -# aliases
    1.51 -
    1.52 -alias ls='ls -F --color=auto'
    1.53 -alias ll='ls -lF'
    1.54 -alias lh='ls -lhF'
    1.55 -alias la='ls -AF'
    1.56 -
    1.57 -alias dh='df -h'
    1.58 -
    1.59 -# standard options
    1.60 -alias cal='cal -m'
    1.61 -alias xpdf='xpdf -z page'
    1.62 -
    1.63 -alias serveme='ssh meillo@192.168.0.100'
    1.64 -
    1.65 -alias du1='du -h --max-depth=1 --exclude=".?*" '  # -> shellscript instead of alias
    1.66 -alias du2='du -h --max-depth=2 --exclude=".?*" '  # -> shellscript instead of alias
    1.67 -
    1.68 -#alias fireworks='wine /usr/share/Fireworks4/Fireworks\ 4.exe'
    1.69 -#alias stendhal='java -jar /home/meillo/Spiele/Stendhal/stendhal'
    1.70 +# command prompt
    1.71 +PS1='\033[01;31m<\033[00m \h \033[01;31m|\033[00m \u \033[01;31m|\033[00m \w \033[01;31m>\033[00m\n    \$ '
    1.72  
    1.73  
    1.74  # vars
    1.75 @@ -67,14 +65,43 @@
    1.76  export DEBEMAIL=meillo@marmaro.de
    1.77  export DEBFULLNAME="markus schnalke"
    1.78  
    1.79 -export HISTSIZE=10000
    1.80 -export HISTFILESIZE=$HISTSIZE
    1.81 -export HISTCONTROL=ignoredups
    1.82  
    1.83  
    1.84 -# enable programmable completion features (you don't need to enable
    1.85 -# this, if it's already enabled in /etc/bash.bashrc and /etc/profiles
    1.86 -# sources /etc/bash.bashrc).
    1.87 -if [ -f /etc/bash_completion ]; then
    1.88 -    . /etc/bash_completion
    1.89 -fi
    1.90 +# functions
    1.91 +
    1.92 +function ls {
    1.93 +  command ls -F --color=auto "$@"
    1.94 +}
    1.95 +function ll {
    1.96 +  ls -l "$@"
    1.97 +}
    1.98 +function lh {
    1.99 +  ls -lh "$@"
   1.100 +}
   1.101 +function la {
   1.102 +  ls -A "$@"
   1.103 +}
   1.104 +
   1.105 +function dh {
   1.106 +  df -h "$@"
   1.107 +}
   1.108 +
   1.109 +function cal {
   1.110 +  command cal -m "$@"
   1.111 +}
   1.112 +function xpdf {
   1.113 +  command xpdf -z page "$@" &
   1.114 +}
   1.115 +
   1.116 +function du1 {
   1.117 +  du -h --max-depth=1 --exclude=".?*" "$@"
   1.118 +}
   1.119 +function du2 {
   1.120 +  du -h --max-depth=2 --exclude=".?*" "$@"
   1.121 +}
   1.122 +
   1.123 +# aliases
   1.124 +
   1.125 +#alias fireworks='wine /usr/share/Fireworks4/Fireworks\ 4.exe'
   1.126 +#alias stendhal='java -jar /home/meillo/Spiele/Stendhal/stendhal'
   1.127 +
     2.1 --- a/.inputrc	Tue Sep 04 22:04:31 2007 +0200
     2.2 +++ b/.inputrc	Wed Sep 05 00:21:17 2007 +0200
     2.3 @@ -1,8 +1,6 @@
     2.4  "\e[5~": history-search-backward
     2.5  "\e[6~": history-search-forward
     2.6  
     2.7 -"\M-s": menu-complete
     2.8 -
     2.9  # perform history expansion on pressing space
    2.10  $if Bash
    2.11    Space: magic-space