Compare commits
3 Commits
archive/li
...
archive/he
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b91d41c66 | ||
|
|
c8e35bbb50 | ||
|
|
c0eb143839 |
17
todo.sh
17
todo.sh
@@ -199,7 +199,10 @@ help()
|
||||
list [TERM...]
|
||||
ls [TERM...]
|
||||
Displays all tasks that contain TERM(s) sorted by priority with line
|
||||
numbers. If no TERM specified, lists entire todo.txt.
|
||||
numbers. Each task must match all TERMs (logical AND); to display
|
||||
tasks that contain any TERM (logical OR), use
|
||||
"TERM1\|TERM2\|..." (with quotes), or TERM1\\\|TERM2 (unquoted).
|
||||
If no TERM specified, lists entire todo.txt.
|
||||
|
||||
listall [TERM...]
|
||||
lsa [TERM...]
|
||||
@@ -215,7 +218,7 @@ help()
|
||||
lf [SRC [TERM...]]
|
||||
Displays all the lines in SRC file located in the todo.txt directory,
|
||||
sorted by priority with line numbers. If TERM specified, lists
|
||||
all lines that contain TERM in SRC file.
|
||||
all lines that contain TERM(s) in SRC file.
|
||||
Without any arguments, the names of all text files in the todo.txt
|
||||
directory are listed.
|
||||
|
||||
@@ -223,7 +226,7 @@ help()
|
||||
lsp [PRIORITY] [TERM...]
|
||||
Displays all tasks prioritized PRIORITY.
|
||||
If no PRIORITY specified, lists all prioritized tasks.
|
||||
If TERM specified, lists only prioritized tasks that contain TERM.
|
||||
If TERM specified, lists only prioritized tasks that contain TERM(s).
|
||||
|
||||
listproj
|
||||
lsprj
|
||||
@@ -775,12 +778,8 @@ _list() {
|
||||
fi
|
||||
items=$(
|
||||
sed = "$src" \
|
||||
| sed '''
|
||||
N
|
||||
s/^/ /
|
||||
s/ *\([ 0-9]\{'"$PADDING"',\}\)\n/\1 /
|
||||
/^[ 0-9]\+ *$/d
|
||||
'''
|
||||
| sed "N; s/^/ /; s/ *\(.\{$PADDING,\}\)\n/\1 /" \
|
||||
| grep -v "^[ 0-9]\+ *$"
|
||||
)
|
||||
if [ "${filter_command}" ]; then
|
||||
filtered_items=$(echo -n "$items" | eval "${filter_command}")
|
||||
|
||||
Reference in New Issue
Block a user