mirror of
https://github.com/nikolassv/bartib
synced 2025-02-26 11:57:12 +00:00
added documentation for project name autocompletion
This commit is contained in:
parent
c757d92b38
commit
b8d8ed34b6
2 changed files with 15 additions and 1 deletions
14
README.md
14
README.md
|
@ -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
|
||||
```
|
|
@ -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(())
|
||||
|
|
Loading…
Add table
Reference in a new issue