diff options
author | Joerg Schirottke <master@kanotix.com> | 2012-02-29 02:09:32 +0100 |
---|---|---|
committer | Andreas Loibl <andreas@andreas-loibl.de> | 2012-02-29 23:39:07 +0100 |
commit | c14823330bc8a964a78803f2cecbfd7947d2037e (patch) | |
tree | 03e52cab492294cd861a46c3f7aaa3df78fa0b35 /config/chroot_local-includes | |
parent | 2313d059f712fbe2f9465139d59ae7b8325cf221 (diff) | |
download | kanotix-c14823330bc8a964a78803f2cecbfd7947d2037e.zip kanotix-c14823330bc8a964a78803f2cecbfd7947d2037e.tar.gz |
update bash.bashrc overide
Diffstat (limited to 'config/chroot_local-includes')
-rw-r--r-- | config/chroot_local-includes/etc/bash.bashrc | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/config/chroot_local-includes/etc/bash.bashrc b/config/chroot_local-includes/etc/bash.bashrc index ea000a6..0fee152 100644 --- a/config/chroot_local-includes/etc/bash.bashrc +++ b/config/chroot_local-includes/etc/bash.bashrc @@ -29,13 +29,29 @@ PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' #esac # enable bash completion in interactive shells -if [ -f /etc/bash_completion ]; then +if [ -f /etc/bash_completion ] && ! shopt -oq posix; then . /etc/bash_completion fi +# if the command-not-found package is installed, use it +if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found ]; then + function command_not_found_handle { + # check because c-n-f could've been removed in the meantime + if [ -x /usr/lib/command-not-found ]; then + /usr/bin/python /usr/lib/command-not-found -- "$1" + return $? + elif [ -x /usr/share/command-not-found ]; then + /usr/bin/python /usr/share/command-not-found -- "$1" + return $? + else + return 127 + fi + } +fi + # enable color support of ls and also add handy aliases if [ -x /usr/bin/dircolors ]; then - eval "`dircolors -b`" + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" alias ls='ls --color=auto' #alias dir='dir --color=auto' #alias vdir='vdir --color=auto' @@ -54,4 +70,3 @@ alias la='ls -A' alias l='ls -CF' alias ..='cd ..' alias cd..='cd ..' - |