improved todo
alias by changing it into a function
This commit is contained in:
parent
a4d31650c5
commit
f0af0f67b8
1 changed files with 8 additions and 2 deletions
10
.zshrc
10
.zshrc
|
@ -1,7 +1,7 @@
|
|||
#!/bin/zsh
|
||||
# Blake's ZSH config file
|
||||
|
||||
# vim:fdm=marker:fmr=>>>,<<<:expandtab:sw=3
|
||||
# vim:fdm=marker:fmr=>>>,<<<:et:ft=zsh:sw=3
|
||||
|
||||
### Basic shell configuration >>>
|
||||
### Environment variables >>>
|
||||
|
@ -87,7 +87,6 @@
|
|||
alias \
|
||||
nvc="(cd ~/.config/nvim && nvim)" \
|
||||
zshrc="$EDITOR ~/.zshrc" \
|
||||
todo="$EDITOR ~/todo" \
|
||||
fstab="sudo $EDITOR /etc/fstab" \
|
||||
|
||||
# Git cLONE
|
||||
|
@ -157,6 +156,13 @@
|
|||
done
|
||||
}
|
||||
|
||||
# an improved way to manage the todo list
|
||||
todo() {
|
||||
cd "$(dirname "$(realpath ~/todo)")"
|
||||
test -d .git || git rev-parse --git-dir > /dev/null 2>&1 && echo 'pulling repository' && git pull
|
||||
"$EDITOR" ~/todo
|
||||
}
|
||||
|
||||
# Simple extraction script. Taken from manjaro's .bashrc
|
||||
ex() {
|
||||
if [ -f $1 ] ; then
|
||||
|
|
Loading…
Add table
Reference in a new issue