mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
39792: improve handling of relative paths in _canonical_paths_add_paths
This commit is contained in:
parent
74aa45910b
commit
59dbab4f1c
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2016-10-31 Barton E. Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 39792: Completion/Unix/Type/_canonical_paths: improve handling
|
||||
of relative paths in _canonical_paths_add_paths
|
||||
|
||||
2016-10-31 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||
|
||||
* 39786: Functions/VCS_Info/Backends/VCS_INFO_get_data_hg,
|
||||
|
|
|
@ -69,7 +69,10 @@ _canonical_paths_add_paths () {
|
|||
expref=${~origpref} 2>/dev/null
|
||||
[[ $origpref == (|*/). ]] && rltrim=.
|
||||
curpref=${${expref%$rltrim}:-./}
|
||||
if zstat $curpref >&/dev/null; then
|
||||
if [[ $expref:h == (.|..) ]]; then
|
||||
_canonical_paths_pwd $expref:h
|
||||
canpref=$REPLY/$expref:t
|
||||
elif zstat $curpref >&/dev/null; then
|
||||
_canonical_paths_get_canonical_path $curpref
|
||||
canpref=$REPLY
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue