zk: Check WIKIROOT before adding n alias for zk
Since this function also requires a WIKIROOT to be available in the environment, we should only define it if that variable is not empty -- just like all the other zk aliases and functions.
This commit is contained in:
parent
6aa8aefe0e
commit
cf544e4740
1 changed files with 13 additions and 13 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
#
|
|
||||||
|
# We have a local wiki
|
||||||
|
if [ -n "${WIKIROOT}" ]; then
|
||||||
|
|
||||||
_zk_wiki() {
|
_zk_wiki() {
|
||||||
zk --working-dir="$WIKIROOT" "$@"
|
zk --working-dir="$WIKIROOT" "$@"
|
||||||
|
|
@ -13,8 +15,6 @@ n() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# We have a local wiki
|
|
||||||
if [ -n "${WIKIROOT}" ]; then
|
|
||||||
# open notes with my vim zettelkasten plugin
|
# open notes with my vim zettelkasten plugin
|
||||||
# TODO better implementation conditional on zk.nvim & zettelkasten existing
|
# TODO better implementation conditional on zk.nvim & zettelkasten existing
|
||||||
# nvim +'lua pcall(require "zk.commands"') --headless +qa 2>&1 or similar to check - but slow
|
# nvim +'lua pcall(require "zk.commands"') --headless +qa 2>&1 or similar to check - but slow
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue