Minor fixes identified through shellcheck and other tools (#350)
* fix whitespace * fix spelling * fix whitespace * unify headers of tests * fix some issues in tests, identified by shellcheck * fix bash completions bash completion files are not supposed to be executable * fix some issues identified by shellcheck Co-authored-by: Ali Karbassi <ali@karbassi.com>
This commit is contained in:
13
todo.sh
13
todo.sh
@@ -134,7 +134,6 @@ $indentedJoinedConfigFileLocations
|
||||
-x
|
||||
Disables TODOTXT_FINAL_FILTER
|
||||
|
||||
|
||||
EndOptionsHelp
|
||||
|
||||
[ "$TODOTXT_VERBOSE" -gt 1 ] && cat <<-'EndVerboseHelp'
|
||||
@@ -156,7 +155,6 @@ $indentedJoinedConfigFileLocations
|
||||
TODOTXT_SIGIL_VALID_PATTERN=.* tweak the allowed chars for +p and @c
|
||||
TODOTXT_SIGIL_AFTER_PATTERN="" optionally allow chars after +p / @c
|
||||
|
||||
|
||||
EndVerboseHelp
|
||||
actionsHelp
|
||||
addonHelp
|
||||
@@ -710,7 +708,6 @@ do
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
if [ -z "$TODO_ACTIONS_DIR" ] || [ ! -d "$TODO_ACTIONS_DIR" ]
|
||||
then
|
||||
TODO_ACTIONS_DIR="$HOME/.todo/actions"
|
||||
@@ -788,7 +785,7 @@ ACTION=${1:-$TODOTXT_DEFAULT_ACTION}
|
||||
|
||||
if [ $TODOTXT_PLAIN = 1 ]; then
|
||||
for clr in ${!PRI_@}; do
|
||||
export "$clr"=$NONE
|
||||
export "$clr"="$NONE"
|
||||
done
|
||||
PRI_X=$NONE
|
||||
DEFAULT=$NONE
|
||||
@@ -1093,7 +1090,7 @@ case $action in
|
||||
SAVEIFS=$IFS
|
||||
IFS=$'\n'
|
||||
|
||||
# Treat each line seperately
|
||||
# Treat each line separately
|
||||
for line in $input ; do
|
||||
_addto "$TODO_FILE" "$line"
|
||||
done
|
||||
@@ -1136,7 +1133,7 @@ case $action in
|
||||
if [ "$TODOTXT_VERBOSE" -gt 0 ]; then
|
||||
getNewtodo "$item"
|
||||
echo "$item $newtodo"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
die "TODO: Error appending task $item."
|
||||
fi
|
||||
@@ -1149,7 +1146,7 @@ case $action in
|
||||
grep "^x " "$TODO_FILE" >> "$DONE_FILE"
|
||||
sed -i.bak '/^x /d' "$TODO_FILE"
|
||||
if [ "$TODOTXT_VERBOSE" -gt 0 ]; then
|
||||
echo "TODO: $TODO_FILE archived."
|
||||
echo "TODO: $TODO_FILE archived."
|
||||
fi
|
||||
;;
|
||||
|
||||
@@ -1240,7 +1237,7 @@ case $action in
|
||||
getNewtodo "$item"
|
||||
echo "$item $newtodo"
|
||||
echo "TODO: $item marked as done."
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "TODO: $item is already marked done."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user