mirror of
https://github.com/mickael-menu/zk
synced 2024-11-15 12:12:56 +00:00
50 lines
1.0 KiB
Plaintext
50 lines
1.0 KiB
Plaintext
$ cd blank
|
|
|
|
$ mkdir dir
|
|
$ mkdir dir/subdir
|
|
$ touch banana.md
|
|
$ touch orange.md
|
|
$ touch dir/orange.md
|
|
$ touch dir/subdir/apple.md
|
|
|
|
# Ignore a file in the root directory.
|
|
$ echo "[note]\n exclude = ['orange.md']" > .zk/config.toml
|
|
$ zk index -v
|
|
>- added banana.md
|
|
>- added dir/orange.md
|
|
>- added dir/subdir/apple.md
|
|
>- ignored orange.md: matched exclude glob "orange.md"
|
|
>
|
|
>Indexed 3 notes in 0s
|
|
> + 3 added
|
|
> ~ 0 modified
|
|
> - 0 removed
|
|
|
|
# Ignore with wildcards.
|
|
$ echo "[note]\n exclude = ['*rang*', 'dir/*']" > .zk/config.toml
|
|
$ zk index -v
|
|
>- unchanged banana.md
|
|
>- removed dir/orange.md
|
|
>- unchanged dir/subdir/apple.md
|
|
>- ignored dir/orange.md: matched exclude glob "dir/*"
|
|
>- ignored orange.md: matched exclude glob "*rang*"
|
|
>
|
|
>Indexed 2 notes in 0s
|
|
> + 0 added
|
|
> ~ 0 modified
|
|
> - 1 removed
|
|
|
|
# Unignore all files.
|
|
$ echo "" > .zk/config.toml
|
|
$ zk index -v
|
|
>- unchanged banana.md
|
|
>- added dir/orange.md
|
|
>- unchanged dir/subdir/apple.md
|
|
>- added orange.md
|
|
>
|
|
>Indexed 4 notes in 0s
|
|
> + 2 added
|
|
> ~ 0 modified
|
|
> - 0 removed
|
|
|