diff --git a/ChangeLog b/ChangeLog index 7967411c3..f699c8ae4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -142,6 +142,7 @@ - Removed obsolete task-faq.5 and task-tutorial.5 man pages. - French localization (thanks to leowzukw). - Removed deprecated 'report.X.limit' feature. +- Improved bash completion when TASKRC is exported. ------ current release --------------------------- diff --git a/scripts/bash/task.sh b/scripts/bash/task.sh index 147b76bc5..73f3488ef 100644 --- a/scripts/bash/task.sh +++ b/scripts/bash/task.sh @@ -50,7 +50,7 @@ # ################################################################################ #the following variable is substituted for by ../../test/bash_completion.t -taskcommand='task' +taskcommand='task rc.verbose:nothing' _task_get_tags() { $taskcommand _tags diff --git a/test/bash_completion.t b/test/bash_completion.t index 9ccbab0a9..f7eee3d36 100755 --- a/test/bash_completion.t +++ b/test/bash_completion.t @@ -27,7 +27,7 @@ use strict; use warnings; -use Test::More tests => 16; +use Test::More tests => 18; # Ensure environment has no influence. delete $ENV{'TASKDATA'}; @@ -55,9 +55,9 @@ if (open my $target, '>', 'task.sh') { my $temp=$_; chomp($_); - if ($_ eq qw{taskcommand='task'}) + if ($_ eq "taskcommand='task rc.verbose:nothing'") { - print $target "taskcommand='../src/task rc:bug.rc'"; + print $target "taskcommand='../src/task rc.verbose:nothing rc:bug.rc'"; } else { @@ -107,6 +107,10 @@ $output = qx{bash ./task.sh task proj : to 2>&1}; ok ($? == 0, 'Exit status check'); unlike ($output, qr/todd/, '\'proj:\' does not expand if abbreviation.minimum is 5'); +$output = qx{TASKRC=bug.rc bash ./task.sh task ad to 2>&1}; +ok ($? == 0, 'Exit status check'); +unlike ($output, qr/override/, 'taskrc override does not display'); + # there should be no gc coming from bash completion qx{../src/task rc:bug.rc add this task should be number 2 and stay number 2 2>&1}; ok ($? == 0, 'Exit status check');