The note dir is in fact our `$WIKIROOT` so we set it to that by default. Also took the chance and added a small 'cd' command into the note dir, using `ncd`
19 lines
491 B
Bash
19 lines
491 B
Bash
#!/usr/bin/env sh
|
|
#
|
|
|
|
n() {
|
|
if [ $# -eq 0 ]; then
|
|
zk edit -i
|
|
else
|
|
zk "${@}"
|
|
fi
|
|
}
|
|
|
|
# open notes with my vim zettelkasten plugin
|
|
# 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
|
|
if command -v nvim >/dev/null 2>&1; then
|
|
alias ni='nvim +"lua require \"zk.commands\".get(\"ZkCd\")()" +"edit $WIKIROOT/index.md"'
|
|
fi
|
|
|
|
alias ncd='pushd $WIKIROOT'
|