From: Paul Hänsch Date: Sun, 15 Jul 2018 19:54:36 +0000 (+0200) Subject: fix: PATH function removed all directory parts shorter than two characters (pattern... X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=a55a4d8fb1dae783a93492c7d9b55d042791864f;p=cgilite fix: PATH function removed all directory parts shorter than two characters (pattern .. and . ;-) --- diff --git a/cgilite.sh b/cgilite.sh index 6821a7a..b936e47 100755 --- a/cgilite.sh +++ b/cgilite.sh @@ -177,9 +177,9 @@ PATH(){ printf %s "$1" \ | sed -r 's;^.*$;/&/;; s;/+;/;g; :X; - s;^/../;/;; s;/./;/;g; + s;^/\.\./;/;; s;/\./;/;g; tX; - s;/[^/]+/../;/;; + s;/[^/]+/\.\./;/;; tX; s;^(/.*)/$;\1;' }