sjl / z-fish

A fork of http://github.com/rupa/z to port it to the Fish shell.
134 stars 30 forks source link

Add / Fix Tab Completion #10

Open frederickjh opened 5 years ago

frederickjh commented 5 years ago

As the maintainer states in the README.md the tab completion in z-fish, z-is not working.

I personally would use tab completion a lot as I work as a web developer and have a lot of directories with the same name but a parent directory that have unique names.

With tab completion as it is in the Bash version of z I can start typing the unique parent directory, hit tab to complete, then add a slash and start on the subdiretory, hit tab to complete to quickly get to a folder.

Currently the non-functioning tab completion is all in the z.fish file. After taking a look at how others have written completions in fish I have to wonder if this will require one or more files. In fish the completions I have seen are in ~/.config/fish/completions/. So, one of the need files could be a completion file ~/.config/fish/completions/z.fish.

frederickjh commented 5 years ago

A lot of fish shell completions can be found here. Many of these call hidden fish functions found here.

The information about the fish shell commands commandline and complete will be useful for this.

sjl commented 5 years ago

If someone PR's a version of it that merges cleanly I'd probably take it, but I don't care about it enough to implement it myself.