added documentation for project name autocompletion

This commit is contained in:
Nikolas Schmidt-Voigt 2021-09-03 15:05:36 +02:00
parent c757d92b38
commit b8d8ed34b6
2 changed files with 15 additions and 1 deletions

View file

@ -107,4 +107,18 @@ bartib edit -e vim
```
bartib last
```
### List all projects
This command lists all projects for which an activity has ever been logged:
```
bartib projects
```
This is especially useful for autocompletion. For example, adding this line to the `.bashrc` enables autocompletion for project names:
```
complete -W "$(bartib projects)" bartib
```

View file

@ -120,7 +120,7 @@ pub fn list_projects(file_name: &str) -> Result<()> {
all_projects.dedup();
for project in all_projects {
println!("{}", project);
println!("\"{}\"", project);
}
Ok(())