From 0b3d124d7816b996864424bfd43e679aa10cab43 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 1 Aug 2016 15:20:13 +1200 Subject: Quote vars correctly within expansions in td(1) --- bin/td | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bin/td') diff --git a/bin/td b/bin/td index 53e3fbd6..6d9aa064 100755 --- a/bin/td +++ b/bin/td @@ -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" -- cgit v1.2.3