The old implementation used a variable to store generated
directory completions. Using a function to generate
completions has many benefits:
__z_complete doesn't have to be called every time
an entry is added or removed to the data file.
When using a variable, on each subsequesnt call to __z_complete,
the completions are added to existing ones. So calling
__z_complete on --clean is reduntant.
Completions weren't updated on --delete; handled automatically
now.
The old implementation used a variable to store generated directory completions. Using a function to generate completions has many benefits:
__z_complete
doesn't have to be called every time an entry is added or removed to the data file.When using a variable, on each subsequesnt call to
__z_complete
, the completions are added to existing ones. So calling__z_complete
on--clean
is reduntant.Completions weren't updated on --delete; handled automatically now.