mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bash Completion
- Improved bash completion when TASKRC is exported. - Added a unit test. Description of previous behavior: $ export TASKRC=/tmp/.taskrc $ task ad<TAB><TAB> lead to the following output: $ task adTASKRC override: /tmp/.taskrc dTASKRC override: /tmp/.taskrc TASKRC override: /tmp/.taskrc Signed-off-by: Paul Beckingham <paul@beckingham.net>
This commit is contained in:
parent
222c357c0a
commit
6eee9e0544
3 changed files with 9 additions and 4 deletions
|
@ -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 ---------------------------
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue