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:
a1346054
2021-08-09 20:03:49 +00:00
committed by GitHub
parent ee94a3fac5
commit 2d70a0aadf
40 changed files with 88 additions and 119 deletions

View File

@@ -1,5 +1,7 @@
#!/bin/bash source-this-script
[ "$BASH_VERSION" ] || return
# bash completion for todo.txt-cli
# Check for bash
[ -z "$BASH_VERSION" ] && return
_todo()
{
@@ -18,7 +20,7 @@ _todo()
local _todo_sh=${_todo_sh:-todo.sh}
local completions
if [ $COMP_CWORD -eq 1 ]; then
if [ "$COMP_CWORD" -eq 1 ]; then
completions="$COMMANDS $(eval TODOTXT_VERBOSE=0 $_todo_sh command listaddons 2>/dev/null) $OPTS"
elif [[ $COMP_CWORD -gt 2 && ( \
"${COMP_WORDS[COMP_CWORD-2]}" =~ ^($MOVE_COMMAND_PATTERN${_todo_file2_actions:+|${_todo_file2_actions}})$ || \