Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: ginatrapani/todo.txt-cli
base: 28e8a4cd8b
...
head fork: ginatrapani/todo.txt-cli
compare: 322c6b95d6
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Apr 25, 2012
mcguiremkm FIX: todo_completion problem with Bash 3.1
Regexp matching changed from 3.1 to 3.2. Make it work for Bash 3.1 by using an intermediate variable, as in 394c4c7.
Cp. http://tech.groups.yahoo.com/group/todotxt/message/4211
d2c44e9
Commits on May 10, 2012
Gina Trapani Merge pull request #87 from inkarkat/complete-bash31-fix
FIX: todo_completion problem with Bash 3.1
322c6b9
Showing with 3 additions and 2 deletions.
  1. +3 −2 todo_completion
5 todo_completion
View
@@ -14,14 +14,15 @@ _todo()
rm depri dp do help list ls listaddons listall lsa listcon \
lsc listfile lf listpri lsp listproj lsprj move \
mv prepend prep pri p replace report shorthelp"
+ local -r MOVE_COMMAND_PATTERN='^(move|mv)$'
local _todo_sh=${_todo_sh:-todo.sh}
local completions
if [ $COMP_CWORD -eq 1 ]; then
completions="$COMMANDS $(eval TODOTXT_VERBOSE=0 $_todo_sh command listaddons) $OPTS"
elif [[ $COMP_CWORD -gt 2 && ( \
- "${COMP_WORDS[COMP_CWORD-2]}" =~ ^(move|mv)$ || \
- "${COMP_WORDS[COMP_CWORD-3]}" =~ ^(move|mv)$ ) ]]; then
+ "${COMP_WORDS[COMP_CWORD-2]}" =~ $MOVE_COMMAND_PATTERN || \
+ "${COMP_WORDS[COMP_CWORD-3]}" =~ $MOVE_COMMAND_PATTERN ) ]]; then
# "move ITEM# DEST [SRC]" has file arguments on positions 2 and 3.
completions=$(eval TODOTXT_VERBOSE=0 $_todo_sh command listfile)
else

No commit comments for this range

Something went wrong with that request. Please try again.