Problem description
I just discovered the cool feature (27a8863) of relative completion. However it seems like there is also a bug: each completed relative path is listed multiple times for my bookmark home:
$ cd-bookmark -c home/<tab>
Applications/ Documents/ Movies/ Music/ Public/ dl/
Applications/ Documents/ Movies/ Pictures/ bak@ dl/
Applications/ Documents/ Movies/ Pictures/ bak@ dl/
Applications/ Documents/ Movies/ Pictures/ bak@ dl/
Applications/ Documents/ Movies/ Pictures/ bak@ dl/
Desktop/ Downloads/ Movies/ Pictures/ bak@ doc@
Desktop/ Downloads/ Music/ Pictures/ bak@ doc@
Desktop/ Downloads/ Music/ Public/ bak@ doc@
Desktop/ Downloads/ Music/ Public/ bin/ doc@
Desktop/ Library/ Music/ Public/ bin/ doc@
Desktop/ Library/ Music/ Public/ bin/ doc@
Desktop/ Library/ Music/ Public/ dl/
Tested on zsh 5.8 on macOS 12.0.1.
Leads
With some debug printing I noticed that this function is called multiple times, maybe correlating with the numer of duplicates?
|
_cd-bookmark_expand_bookmark_id() { |
|
local bookmark_id="${IPREFIX%/}" |
|
local real_path="$(_call_program cd-bookmark-expand-id cd-bookmark -p "$bookmark_id")" |
|
_path_files -W "$real_path" -/ |
|
} |
Problem description
I just discovered the cool feature (27a8863) of relative completion. However it seems like there is also a bug: each completed relative path is listed multiple times for my bookmark
home:Tested on zsh
5.8on macOS12.0.1.Leads
With some debug printing I noticed that this function is called multiple times, maybe correlating with the numer of duplicates?
cd-bookmark/_cd-bookmark
Lines 57 to 61 in 27a8863