From: Amand Tihon Date: Tue, 2 Jun 2009 12:41:40 +0000 (+0200) Subject: Shorten konsole tab text for directories X-Git-Url: https://git.alrj.org/?a=commitdiff_plain;h=b7882ea427761943820b1b1f8d28b1aa22927ecc;p=zsh.d.git Shorten konsole tab text for directories --- diff --git a/S61_konsoletabs b/S61_konsoletabs index 7488e06..8af1f11 100644 --- a/S61_konsoletabs +++ b/S61_konsoletabs @@ -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 }