joelthelion/autojump — comment on commit df67df476b7a3682ab11a556f0c00629f33727f0
File:  line 0
By clvv:

Author of `f` here. I saw this commit two days ago and I started working on a similar functionality for `f`. Basically, I wanted to be able to use this kind of "magic completion" for all commands. And I want to share some implementation information here:

As you might have already noticed, this commit will overwrite any existing completion defined for cp, mv, diif, etc. I researched on how to avoid overwriting existing completions. And it turns ou that it is impossible to do without hacks in bash. However, it is perfectly safe and easy to do in zsh.

Here are the two commits for `f` that enables this functionality:

https://github.com/clvv/f/commit/842984e0c5c656752a0230e8c9ef6babb5ee1b6c
https://github.com/clvv/f/commit/46e13a6f30b5fe2416edbb54915c4bc9f05563d3

I just thought I should share the code. By the way, thanks for this good completion scheme.