aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools
diff options
context:
space:
mode:
authorjohannst <johannes.stoelp@gmail.com>2020-09-17 09:28:01 +0000
committerjohannst <johannes.stoelp@gmail.com>2020-09-17 09:28:01 +0000
commit7a8d3b4eec4056600625f2d359320c8a01fa88b3 (patch)
treeee4e4172f366ed459af58ac6efa2db7f1934e962 /src/tools
parent2e329ad934ef010fd94afe965f14ab895dcb515e (diff)
downloadnotes-7a8d3b4eec4056600625f2d359320c8a01fa88b3.tar.gz
notes-7a8d3b4eec4056600625f2d359320c8a01fa88b3.zip
fixed typos in zsh + added note and links for builtins
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/zsh.md16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/tools/zsh.md b/src/tools/zsh.md
index ae2a4bc..2980d89 100644
--- a/src/tools/zsh.md
+++ b/src/tools/zsh.md
@@ -51,7 +51,7 @@ $words[CURRENT-1] # previous word (relative to cursor position)
- `_describe` simple completion, just words + description
- `_arguments` sophisticated completion, allow to specify actions
-#### Completion with [`_describe`][zsh-comp-utils]
+#### Completion with [`_describe`][zsh-comp-fn]
```zsh
_describe MSG COMP
```
@@ -72,7 +72,7 @@ bla -- desc for bla
blu -- desc for blu
```
-#### Completion with [`_arguments`][zsh-comp-utils]
+#### Completion with [`_arguments`][zsh-comp-fn]
```zsh
_arguments SPEC [SPEC...]
```
@@ -111,9 +111,9 @@ function _foo_color() {
function _foo() {
_arguments \
"-c[define color]:color:->s_color" \
- "-s[select sound]:color:(low high)" \
+ "-s[select sound]:sound:(low high)" \
"-f[select file]:file:_files" \
- "-d[select dir]:fir:_files -/" \
+ "-d[select dir]:dir:_files -/" \
"-h[help]"
case $state in
@@ -122,4 +122,10 @@ function _foo() {
}
```
-[zsh-comp-utils]: http://zsh.sourceforge.net/Doc/Release/Completion-System.html#Completion-Functions
+> `_files` is a zsh builtin utility function to complete files/dirs see
+> - [zsh completion functions][zsh-comp-fn]
+> - [zsh completion utility functions][zsh-comp-utility-fn]
+
+
+[zsh-comp-fn]: http://zsh.sourceforge.net/Doc/Release/Completion-System.html#Completion-Functions
+[zsh-comp-utility-fn]: https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org#utility-functions