From b7882ea427761943820b1b1f8d28b1aa22927ecc Mon Sep 17 00:00:00 2001 From: Amand Tihon Date: Tue, 2 Jun 2009 14:41:40 +0200 Subject: [PATCH] Shorten konsole tab text for directories --- S61_konsoletabs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 } -- 2.39.5