diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2024-12-08 14:15:03 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-12-08 14:15:03 +0800 |
commit | f5a47d15d42a3aaaddf9d4daa70e28b5deeca104 (patch) | |
tree | 1136f41b959e46b917b04e6319523f805581e191 /bin/log | |
parent | a42ea5a5814113e6952b97f597a78d1061a3f9ea (diff) |
Update
Diffstat (limited to 'bin/log')
-rw-r--r-- | bin/log/shellrc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/log/shellrc b/bin/log/shellrc index b3c95fc..504a129 100644 --- a/bin/log/shellrc +++ b/bin/log/shellrc | |||
@@ -1,7 +1,12 @@ | |||
1 | # about vimwiki | 1 | # about vimwiki |
2 | alias cdl='cd ~/log' | 2 | alias cdl='cd ~/log' |
3 | alias chw='tig -C ~/log' | 3 | alias chw='tig -C ~/log' |
4 | ww() { entry="${1:-inbox}"; vim ~/log/${entry%%.md}.md; } | 4 | ww() { |
5 | entry="${1:-inbox}" | ||
6 | entry="${entry%.md}" | ||
7 | file=$(find ~/log -name "${entry}*" | head -1) | ||
8 | $EDITOR $file | ||
9 | } | ||
5 | wj() { echo "$@" >>~/log/buffer.md; } | 10 | wj() { echo "$@" >>~/log/buffer.md; } |
6 | wg() { grep -r "$@" --color --exclude-dir={logseq,.git,.obsidian} ~/log; } | 11 | wg() { grep -r "$@" --color --exclude-dir={logseq,.git,.obsidian} ~/log; } |
7 | wi() { cat ~/log/${1%%.md}.md; } | 12 | wi() { cat ~/log/${1%%.md}.md; } |