Skip to content

Instantly share code, notes, and snippets.

@zph
Created May 28, 2012 04:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zph/2817309 to your computer and use it in GitHub Desktop.
Save zph/2817309 to your computer and use it in GitHub Desktop.
--- todo_count_tevic.sh 2012-05-28 00:48:34.000000000 -0400
+++ todo_count_wynn.sh 2012-05-28 00:47:41.000000000 -0400
@@ -1,8 +1,8 @@
todo_count(){
- if $(which todo.sh &> /dev/null)
+ if $(which todo &> /dev/null)
then
- num=$(echo $(todo.sh ls | grep "^[0-9]" | wc -l))
- let todos=num
+ num=$(echo $(todo ls $1 | wc -l))
+ let todos=num-2
if [ $todos != 0 ]
then
echo "$todos"
@@ -13,8 +13,3 @@
echo ""
fi
}
-function zle-line-init zle-keymap-select {
-RPS1="${${KEYMAP/vicmd/>>> ○[$(todo_count)]}/(main|viins)/± <<<[$(todo_count)]}"
- RPS2=$RPS1
- zle reset-prompt
-}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment