diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-01 15:20:13 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-01 15:20:13 +1200 |
commit | 0b3d124d7816b996864424bfd43e679aa10cab43 (patch) | |
tree | 86751f2a2930b686d8b896647b735c65d71caef4 /bin/td | |
parent | Remove unused variable in td(1) (diff) | |
download | dotfiles-0b3d124d7816b996864424bfd43e679aa10cab43.tar.gz dotfiles-0b3d124d7816b996864424bfd43e679aa10cab43.zip |
Quote vars correctly within expansions in td(1)
Diffstat (limited to 'bin/td')
-rwxr-xr-x | bin/td | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2,8 +2,8 @@ # Manage to-do files with just $EDITOR and git(1) # Specify the path and file -dir=${TODO_DIR:-$HOME/Todo} -file=${1:-${TODO_NAME:-todo}} +dir=${TODO_DIR:-"$HOME"/Todo} +file=${1:-"${TODO_NAME:-todo}"} # If the directory doesn't exist, create it [ -d "$dir" ] || mkdir -p -- "$dir" || exit @@ -22,7 +22,7 @@ isgr || git init || exit [ -e "$file" ] || touch -- "$file" || exit # Launch $VISUAL (or $EDITOR (or vi(1))) to edit the appropriate to-do file -"${VISUAL:-${EDITOR:-vi}}" "$file" +"${VISUAL:-"${EDITOR:-vi}"}" "$file" # Add the file to the changeset git add -- "$file" |