mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-23 23:46:42 +02:00
fish completion: use literal tabs in sed calls
sed on OS X does not understand \t. Therefore, replace all \t's with literal tabs.
This commit is contained in:
parent
daf56db8ec
commit
db0cb5a555
3 changed files with 9 additions and 4 deletions
1
AUTHORS
1
AUTHORS
|
@ -119,6 +119,7 @@ The following submitted code, packages or analysis, and deserve special thanks:
|
|||
Oota Toshiya
|
||||
ribbon
|
||||
Daniel Shahaf
|
||||
Johannes Wienke
|
||||
|
||||
Thanks to the following, who submitted detailed bug reports and excellent
|
||||
suggestions:
|
||||
|
|
|
@ -47,6 +47,8 @@
|
|||
(thanks to Denis Kasak).
|
||||
- TW-1615 Japanese translation for Taskwarrior(150513) (thanks to ribbon).
|
||||
- TW-1617 Can't search for multi-word project (thanks to Audrey Easterday).
|
||||
- TW-1619 fish completion contain backspaces in fish master version (thanks to
|
||||
Johannes Wienke₎.
|
||||
- TW-1622 Duration UDA can't take an algebraic expression (thanks to Jeremy John
|
||||
Reeder).
|
||||
- TW-1626 Wrong wait date (thanks to Andrea Rizzi).
|
||||
|
|
|
@ -55,6 +55,8 @@
|
|||
#
|
||||
# http://www.opensource.org/licenses/mit-license.php
|
||||
|
||||
# NOTE: remember that sed on OS X is different in some aspects. E.g. it does
|
||||
# not understand \t for tabs.
|
||||
|
||||
# convinience functions
|
||||
|
||||
|
@ -74,7 +76,7 @@ end
|
|||
|
||||
function __fish.task.zsh
|
||||
set -q argv[2]; and set task_argv $argv[2..-1]
|
||||
task _zsh$argv[1] $task_argv | sed 's/:/\t/'
|
||||
task _zsh$argv[1] $task_argv | sed 's/:/ /'
|
||||
end
|
||||
|
||||
|
||||
|
@ -141,7 +143,7 @@ function __fish.task.token_clean
|
|||
end
|
||||
|
||||
function __fish.task.list.attr_name
|
||||
task _columns | sed 's/$/:\tattribute/g'
|
||||
task _columns | sed 's/$/: attribute/g'
|
||||
# BUG: doesn't support file completion
|
||||
echo rc
|
||||
end
|
||||
|
@ -149,7 +151,7 @@ end
|
|||
function __fish.task.list.attr_value
|
||||
set token (commandline -ct | cut -d ':' -f 1 | cut -d '.' -f 1 | __fish.task.token_clean)
|
||||
if test -n $token
|
||||
set attr_names (__fish.task.list.attr_name | sed 's/:\t/\t/g' | grep '^'$token | cut -d ' ' -f 1)
|
||||
set attr_names (__fish.task.list.attr_name | sed 's/: / /g' | grep '^'$token | cut -d ' ' -f 1)
|
||||
for attr_name in $attr_names
|
||||
if test -n $attr_name
|
||||
__fish.task.list.attr_value_by_name $attr_name
|
||||
|
@ -250,7 +252,7 @@ function __fish.task.list.tag
|
|||
end
|
||||
|
||||
function __fish.task.list.task
|
||||
__fish.task.zsh ids | sed -E 's/^(.*)\t(.*)$/\2\ttask [id = \1]/g'
|
||||
__fish.task.zsh ids | sed -E 's/^(.*) (.*)$/\2 task [id = \1]/g'
|
||||
end
|
||||
|
||||
function __fish.task.list
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue