]> git.alrj.org Git - zsh.d.git/commitdiff
Shorten konsole tab text for directories
authorAmand Tihon <amand.tihon@iba-group.com>
Tue, 2 Jun 2009 12:41:40 +0000 (14:41 +0200)
committerAmand Tihon <amand.tihon@iba-group.com>
Tue, 2 Jun 2009 12:41:40 +0000 (14:41 +0200)
S61_konsoletabs

index 7488e06895eb3f52c3978743a7f7a9c3295673c0..8af1f116354e80b597bb566c74d81fb8e11dc32f 100644 (file)
@@ -6,7 +6,14 @@ konsole-rename-path () {
     then
         local DIR
         DIR=${PWD/#${HOME}/\~}
-        dcop ${KONSOLE_DCOP_SESSION} renameSession "$DIR"
+        SDIR="${DIR[-28,-1]}"
+        if [[ "$SDIR" != "$DIR" ]]
+        then
+           SDIR="...${DIR[-25,-1]}"
+        else
+           SDIR="$DIR"
+        fi
+        dcop ${KONSOLE_DCOP_SESSION} renameSession "$SDIR"
     fi
 }