baptistemehat / forest

A terminal-based project manager
GNU General Public License v3.0
0 stars 0 forks source link

Add completion #14

Open baptistemehat opened 2 weeks ago

baptistemehat commented 2 weeks ago

Investigate how to add completion to the app for completing:

baptistemehat commented 3 days ago

For zsh completion https://github.com/git/git/blob/master/contrib/completion/git-completion.zsh https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org https://github.com/zsh-users/zsh/blob/master/Etc/completion-style-guide

baptistemehat commented 2 days ago

Status

clap enables developpers to generate static completions at build time such as

forest <tab> 
task tree note switch ...

but for now, it does not provide ant way to generate dynamic completion functions (ie, retrieving task and note ids for completion) at build time:

forest note edit <tab>
099cc8   #my note
922aaf   # another note
...

What to do

From there I see two options:

baptistemehat commented 2 days ago

Here is what just does:

baptistemehat commented 2 days ago

Plan

For now, add the basic static buildtime-generated completions alongside the binary. Dynamic completion can wait.