Rally bash completion does not allow to auto-complete file path

Bug #1470006 reported by Alexander Maretskiy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rally
Fix Released
Medium
Alexander Maretskiy

Bug Description

Regular shell prompt allows to auto-complete files paths (the most used case is path to task file), however that does not work with rally bash completion

Steps to reproduce:

 * Having rally and some task file, for example foo.json
 * type "rally task start " and that press TAB TAB to get some auto-complete choices

  Expected result:
    having choices that include "foo.json"

  Actual result:
    the only choices are rally arguments:
    --abort-on-sla-failure --deployment --no-use --tag --task --task-args --task-args-file

 * type "rally task start --task" and again press TAB TAB to get completion choices

  Expected result:
    having choices that include "foo.json"

  Actual result:
    the only choices are rally arguments:
    --abort-on-sla-failure --deployment --no-use --tag --task --task-args --task-args-file

 * then "rally task start --task foo" and again press TAB TAB to get completion choices

  Expected result:
    having auto-completion to "rally task start --task foo.json"

  Actual result:
    nothing happens

description: updated
description: updated
Changed in rally:
status: New → Confirmed
importance: Undecided → Medium
Changed in rally:
assignee: nobody → Alexander Maretskiy (maretskiy)
Changed in rally:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to rally (master)

Reviewed: https://review.openstack.org/197186
Committed: https://git.openstack.org/cgit/openstack/rally/commit/?id=ca34e1ea2d56bd960ffe902be69325cbd3c077c5
Submitter: Jenkins
Branch: master

commit ca34e1ea2d56bd960ffe902be69325cbd3c077c5
Author: Alexander Maretskiy <email address hidden>
Date: Tue Jun 30 19:44:11 2015 +0300

    [Bash-Completion] Fix bash completon for files paths

    Changes:
      * fix for command `rally task start --task [TAB]' - now
        it shows filepaths choices
      * introduces function _rally_filedir as replacement for
        _filedir - this fixes issue `._filedir: command not found'
        in case if /etc/bash_completion routines are not loaded
      * small refactoring in rally bash completion

    Change-Id: Ib5e15a20c52ba3ccec32424d9404d2a929d82958
    Closes-Bug: #1470006

Changed in rally:
status: In Progress → Fix Committed
Changed in rally:
milestone: none → 0.1.0
Changed in rally:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.