agkozak / zsh-z

Jump quickly to directories that you have visited "frecently." A native Zsh port of z.sh with added features.
MIT License
2.02k stars 76 forks source link

Use preexec hook to also index the files from the commnd line #75

Open cristiansofronie opened 1 year ago

cristiansofronie commented 1 year ago

Sometimes I remember the filename that I edited with vi or run some commands on but not the directory. It would be pretty useful to also index that. The Zsh completion system seems to know that is a file or we could just apply a simple heuristic where we stat args.

If you think that this is useful I might give it a try soon.