diff options
| author | Barton E. Schaefer <schaefer@zsh.org> | 2016-10-31 12:14:23 -0700 |
|---|---|---|
| committer | Barton E. Schaefer <schaefer@zsh.org> | 2016-10-31 12:14:23 -0700 |
| commit | 59dbab4f1c0898f9a354d85051b1d5a5e776d984 (patch) | |
| tree | 355f23e14151650bcb23af41a64373614ddd2775 /Completion/Unix | |
| parent | 39786: vcs_info (hg): Use native hexdump implementation instead of external c... (diff) | |
| download | zsh-59dbab4f1c0898f9a354d85051b1d5a5e776d984.tar zsh-59dbab4f1c0898f9a354d85051b1d5a5e776d984.tar.gz zsh-59dbab4f1c0898f9a354d85051b1d5a5e776d984.tar.bz2 zsh-59dbab4f1c0898f9a354d85051b1d5a5e776d984.tar.lz zsh-59dbab4f1c0898f9a354d85051b1d5a5e776d984.tar.xz zsh-59dbab4f1c0898f9a354d85051b1d5a5e776d984.tar.zst zsh-59dbab4f1c0898f9a354d85051b1d5a5e776d984.zip | |
39792: improve handling of relative paths in _canonical_paths_add_paths
Diffstat (limited to 'Completion/Unix')
| -rw-r--r-- | Completion/Unix/Type/_canonical_paths | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Completion/Unix/Type/_canonical_paths b/Completion/Unix/Type/_canonical_paths index 9bccc7f86..6482602ac 100644 --- a/Completion/Unix/Type/_canonical_paths +++ b/Completion/Unix/Type/_canonical_paths @@ -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 |
