Skip to content

Commit

Permalink
renamed 'fit' plugin to 'top'
Browse files Browse the repository at this point in the history
  • Loading branch information
Thann committed Nov 11, 2013
1 parent 4320118 commit dac16f5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
19 changes: 0 additions & 19 deletions fit

This file was deleted.

19 changes: 19 additions & 0 deletions top
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
# Lists as many items as can fit in the terminal, no wrapping or scrolling.

if [ -n "$1" ]; then
if [ "$1" == "usage" ]; then
echo " $(basename $0) [TERM...]"
echo " Lists as many items as can fit in the terminal, no wrapping or scrolling."
echo ""
exit
fi
shift
fi

TERMINAL_FIT_SUB="sed -e '$(expr $(tput lines) - 3),\$d' -e 's/\(^\x1B\[[0-9;]*[mK]\)\?\([^\x1B]\{$(expr $(tput cols) - 1)\}\).*$/\1\2…/g'"

export TODOTXT_FINAL_FILTER=$TODOTXT_FINAL_FILTER" | "$TERMINAL_FIT_SUB

_list "$TODO_FILE" "$@"

0 comments on commit dac16f5

Please sign in to comment.