improvements to todo()
This commit is contained in:
parent
77fc724098
commit
297f068dc3
1 changed files with 4 additions and 1 deletions
5
.zshrc
5
.zshrc
|
@ -158,9 +158,12 @@
|
||||||
|
|
||||||
# an improved way to manage the todo list
|
# an improved way to manage the todo list
|
||||||
todo() {
|
todo() {
|
||||||
|
(
|
||||||
cd "$(dirname "$(realpath ~/todo)")"
|
cd "$(dirname "$(realpath ~/todo)")"
|
||||||
test -d .git || git rev-parse --git-dir > /dev/null 2>&1 && echo 'pulling repository' && git pull
|
# only pull the repo if there is some argument
|
||||||
|
[ -z "$1" ] || test -d .git || git rev-parse --git-dir > /dev/null 2>&1 && echo 'pulling repository' && git pull
|
||||||
"$EDITOR" ~/todo
|
"$EDITOR" ~/todo
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
# Simple extraction script. Taken from manjaro's .bashrc
|
# Simple extraction script. Taken from manjaro's .bashrc
|
||||||
|
|
Loading…
Add table
Reference in a new issue