slitaz-base-files rev 338

Update /etc/profile
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Jan 14 10:21:20 2019 +0100 (5 months ago)
parents 69ad2183be35
children 3b8ba0fadc4f
files rootfs/etc/profile
line diff
     1.1 --- a/rootfs/etc/profile	Thu Mar 22 04:32:12 2018 +0200
     1.2 +++ b/rootfs/etc/profile	Mon Jan 14 10:21:20 2019 +0100
     1.3 @@ -47,7 +47,7 @@
     1.4  
     1.5  # Update X Terminal window title
     1.6  #
     1.7 -ip=$(ifconfig $(route -n 2>/dev/null | sed '$!d;s/.* //') 2>/dev/null | sed '/t a/!d;s/.*:\(.*\) B.*/\1/')
     1.8 +ip=$(ifconfig $(route -n 2>/dev/null | sed '/^0\.0\.0\.0/!d;s/.* //') 2>/dev/null | sed '/t a/!d;s/.*r:\([^ ]*\).*/\1/')
     1.9  case "$TERM" in
    1.10  	xterm*|rxvt*) echo -ne "\033]0;$(hostname) $(cat /etc/slitaz-release) $ip \007";;
    1.11  esac
    1.12 @@ -77,3 +77,8 @@
    1.13  popd() {
    1.14  	[ -n "$_dirs" ] && _dirs="${_dirs#* }" && cd ${_dirs%% *} && dirs
    1.15  }
    1.16 +
    1.17 +command_not_found_handle() {
    1.18 +	[ -x /bin/command_not_found ] && /bin/command_not_found "$@" ||
    1.19 +		echo "$SHELL: $1: not found"
    1.20 +}