bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem: completion changes user-relative path into absolute path breaki


From: L A Walsh
Subject: Problem: completion changes user-relative path into absolute path breaking relative-path usages
Date: Mon, 06 Mar 2017 04:33:25 -0800
User-agent: Thunderbird


I have used relative paths to a 'base' and 'dest' to allow
comparisons/upgrades, etc, something along the lines of
(this is a rough-spur of the moment example):

cur=where I'm currently working
base=olddir
...
idea that no matter where I move in new tree, path from
'cur' is same as path from 'base' for old stuff

Under 4.3:

Ishtar:tools/../newwork/very_long_path> cd util-linux-2.29.2
Ishtar:../util-linux-2.29.2> printf "cur=$cur\nbase=$base\n"
cur=/home/tools/util-linux/year-yyyy/month-mmm/day-ddd/newwork/very_long_path
base=/home/tools/util-linux/year-yyyy/month-mmm/day-ddd/newwork/very_long_path/archive

mydiff() {
cpth=${1#../}
diff $base/$cpth $cur/$cpth && echo "Same."
}

Ishtar:../util-linux-2.29.2> cd util-linux-2.29.2
Ishtar:../util-linux-2.29.2> mydiff ../config-2292.sh
Same.


Under 4.4:

Ishtar:../util-linux-2.29.2> mydiff ../conf<ESC>
Ishtar:../util-linux-2.29.2> mydiff /home/tools/util-linux/year-yyyy/month-mmm/day-ddd/newwork/very_long_path/config-2292.sh diff: /home/tools/util-linux/year-yyyy/month-mmm/day-ddd/newwork/very_long_path/archive//home/tools/util-linux/year-yyyy/month-mmm/day-ddd/newwork/very_long_path/config-2292.sh: No such file or directory diff: /home/tools/util-linux/year-yyyy/month-mmm/day-ddd/newwork/very_long_path//home/tools/util-linux/year-yyyy/month-mmm/day-ddd/newwork/very_long_path/config-2292.sh: No such file or directory


It throws away the relative path I need/expect and can't
find anything, but worse it is very confusing throwing out
an untyped path from the root.

Please, can this be fixed so the default is to not expand with
those who want such unwieldy paths can apply some option?

I just recently tried to up my shell from 4.3 to use
4.4 so I'd be better able to catch problems, but this is
enough to send me back again until the rough edges are
more ironed out...  Why would this change become the default?

Hoping for a soon fix,
Thanks
-linda





reply via email to

[Prev in Thread] Current Thread [Next in Thread]