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 (2007-09-04)
parents 68dd6ae11835
children d7884728e836
files .bashrc .inputrc
diffstat 2 files changed, 59 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/.bashrc	Tue Sep 04 22:04:31 2007 +0200
+++ b/.bashrc	Wed Sep 05 00:21:17 2007 +0200
@@ -11,50 +11,48 @@
 # If not running interactively, don't do anything:
 [ -z "$PS1" ] && return
 
+
 # check the window size after each command and, if necessary,
 # update the values of LINES and COLUMNS.
 shopt -s checkwinsize
 
+
 # enable colored ls output
 eval "`dircolors -b $HOME/.dircolorsrc`"
 
+
 # one history for all
 shopt -s histappend
 PROMPT_COMMAND='history -a'
+export HISTCONTROL=ignoredups
+# larger history
+export HISTSIZE=100000
+export HISTFILESIZE=$HISTSIZE
 
-# command prompt
-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    \$ '
+
+# enable programmable completion features (you don't need to enable
+# this, if it's already enabled in /etc/bash.bashrc and /etc/profiles
+# sources /etc/bash.bashrc).
+if [ -f /etc/bash_completion ]; then
+    . /etc/bash_completion
+fi
+
 
 # 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}\007"'
+    PROMPT_COMMAND=$PROMPT_COMMAND' ; echo -ne "\033]0;title---${USER}@${HOSTNAME}: ${PWD}\007"'
+    ;;
+screen*)
+    PROMPT_COMMAND=$PROMPT_COMMAND' ; echo -ne "\033]0;screen---${USER}@${HOSTNAME}: ${PWD}\007"'
     ;;
 *)
     ;;
 esac
 
 
-# aliases
-
-alias ls='ls -F --color=auto'
-alias ll='ls -lF'
-alias lh='ls -lhF'
-alias la='ls -AF'
-
-alias dh='df -h'
-
-# standard options
-alias cal='cal -m'
-alias xpdf='xpdf -z page'
-
-alias serveme='ssh meillo@192.168.0.100'
-
-alias du1='du -h --max-depth=1 --exclude=".?*" '  # -> shellscript instead of alias
-alias du2='du -h --max-depth=2 --exclude=".?*" '  # -> shellscript instead of alias
-
-#alias fireworks='wine /usr/share/Fireworks4/Fireworks\ 4.exe'
-#alias stendhal='java -jar /home/meillo/Spiele/Stendhal/stendhal'
+# command prompt
+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    \$ '
 
 
 # vars
@@ -67,14 +65,43 @@
 export DEBEMAIL=meillo@marmaro.de
 export DEBFULLNAME="markus schnalke"
 
-export HISTSIZE=10000
-export HISTFILESIZE=$HISTSIZE
-export HISTCONTROL=ignoredups
 
 
-# enable programmable completion features (you don't need to enable
-# this, if it's already enabled in /etc/bash.bashrc and /etc/profiles
-# sources /etc/bash.bashrc).
-if [ -f /etc/bash_completion ]; then
-    . /etc/bash_completion
-fi
+# functions
+
+function ls {
+  command ls -F --color=auto "$@"
+}
+function ll {
+  ls -l "$@"
+}
+function lh {
+  ls -lh "$@"
+}
+function la {
+  ls -A "$@"
+}
+
+function dh {
+  df -h "$@"
+}
+
+function cal {
+  command cal -m "$@"
+}
+function xpdf {
+  command xpdf -z page "$@" &
+}
+
+function du1 {
+  du -h --max-depth=1 --exclude=".?*" "$@"
+}
+function du2 {
+  du -h --max-depth=2 --exclude=".?*" "$@"
+}
+
+# aliases
+
+#alias fireworks='wine /usr/share/Fireworks4/Fireworks\ 4.exe'
+#alias stendhal='java -jar /home/meillo/Spiele/Stendhal/stendhal'
+
--- a/.inputrc	Tue Sep 04 22:04:31 2007 +0200
+++ b/.inputrc	Wed Sep 05 00:21:17 2007 +0200
@@ -1,8 +1,6 @@
 "\e[5~": history-search-backward
 "\e[6~": history-search-forward
 
-"\M-s": menu-complete
-
 # perform history expansion on pressing space
 $if Bash
   Space: magic-space