zsh: todo() now changes the working dir
This commit is contained in:
parent
29ddd45f95
commit
063db819b4
1 changed files with 1 additions and 0 deletions
1
.zshrc
1
.zshrc
|
@ -164,6 +164,7 @@
|
||||||
todo() {
|
todo() {
|
||||||
( # subshell to protect against directory changes
|
( # subshell to protect against directory changes
|
||||||
if [ -z "$@" ];then
|
if [ -z "$@" ];then
|
||||||
|
cd "$(dirname "$(realpath ~/todo)")"
|
||||||
$EDITOR ~/todo
|
$EDITOR ~/todo
|
||||||
else
|
else
|
||||||
cd "$(dirname "$(realpath ~/todo)")"
|
cd "$(dirname "$(realpath ~/todo)")"
|
||||||
|
|
Loading…
Add table
Reference in a new issue