Skip to content

Commit ce0e912

Browse files
committed
Update bash completion docs with more complete instructions
1 parent 7fa2f94 commit ce0e912

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,27 @@ This is just one tool in the chain. `notes` is a command line tool, and some peo
2424
Download `notes`, `chmod +x`, put it in your `$path`. This will probably do it:
2525

2626
```bash
27-
curl https://cdn.rawgit.com/pimterry/notes/v0.1.2/notes > /usr/local/bin/notes && chmod +x /usr/local/bin/notes
27+
curl https://cdn.rawgit.com/pimterry/notes/v0.2.0/notes > /usr/local/bin/notes && chmod +x /usr/local/bin/notes
2828
```
2929

3030
By default your notes live in ~/notes, but you can change that to anywhere you like by setting the `$NOTES_DIRECTORY` environmental variable.
3131

3232
#### Installing Bash completion
3333

34-
If you want bash autocompletion copy the completion script into the bash completion directory. The bash completion directory is `/usr/share/bash-completion/completions/` on a typical debian jessie install, you can you can get the bash completion directory by running the following command:
34+
`notes` includes bash autocompletion, to let you tab-complete commands and your note names. This requires Bash > 4.0 and [bash-completion](https://github.com/scop/bash-completion) to be installed - it's probably available from your friendly local package manager.
35+
36+
To enable completion for notes, copy the completion script into your bash completion directory, and it should be automatically loaded. The bash completion directory is `/usr/share/bash-completion/completions/` on a typical Debian install, or `/usr/local/etc/bash_completion.d/` on OSX with `bash-completion` from homebrew. You may be able to find your own bash completion directory by running the following command:
3537

3638
pkg-config --variable=completionsdir bash-completion
3739

3840
Installing the completions might be as follows:
3941

4042
```bash
41-
curl https://cdn.rawgit.com/pimterry/notes/v0.1.1/notes.bash_completion > /usr/share/bash-completion/completions/notes
43+
curl https://cdn.rawgit.com/pimterry/notes/v0.2.0/notes.bash_completion > /usr/share/bash-completion/completions/notes
4244
```
4345

46+
You'll need to open a new shell for this to take effect.
47+
4448
## How do I configure this?
4549

4650
You can set your favourite text editor and your notes directory by setting the `$EDITOR` and `$NOTES_DIRECTORY` environmental variables.

0 commit comments

Comments
 (0)