Compare commits
2 Commits
archive/he
...
archive/li
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
272cd5e469 | ||
|
|
17658c852d |
17
todo.sh
17
todo.sh
@@ -199,10 +199,7 @@ help()
|
||||
list [TERM...]
|
||||
ls [TERM...]
|
||||
Displays all tasks that contain TERM(s) sorted by priority with line
|
||||
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.
|
||||
numbers. If no TERM specified, lists entire todo.txt.
|
||||
|
||||
listall [TERM...]
|
||||
lsa [TERM...]
|
||||
@@ -218,7 +215,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(s) in SRC file.
|
||||
all lines that contain TERM in SRC file.
|
||||
Without any arguments, the names of all text files in the todo.txt
|
||||
directory are listed.
|
||||
|
||||
@@ -226,7 +223,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(s).
|
||||
If TERM specified, lists only prioritized tasks that contain TERM.
|
||||
|
||||
listproj
|
||||
lsprj
|
||||
@@ -778,8 +775,12 @@ _list() {
|
||||
fi
|
||||
items=$(
|
||||
sed = "$src" \
|
||||
| sed "N; s/^/ /; s/ *\(.\{$PADDING,\}\)\n/\1 /" \
|
||||
| grep -v "^[ 0-9]\+ *$"
|
||||
| sed '''
|
||||
N
|
||||
s/^/ /
|
||||
s/ *\([ 0-9]\{'"$PADDING"',\}\)\n/\1 /
|
||||
/^[ 0-9]\+ *$/d
|
||||
'''
|
||||
)
|
||||
if [ "${filter_command}" ]; then
|
||||
filtered_items=$(echo -n "$items" | eval "${filter_command}")
|
||||
|
||||
Reference in New Issue
Block a user