Project

General

Profile

Actions

Bug #603

closed

lttng-bash_completion out of sync, includes an error

Added by Daniel U. Thibault over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
Start date:
07/25/2013
Due date:
% Done:

30%

Estimated time:

Description

As of lttng-tools-2.3.0-rc2-6-81ea21b, lttng-bash_completion has gotten out of sync with the lttng command-line interface: it handles two obsolete commands and omits a new one. There is also an error in one of the blocks.

Line 23:

_lttng_cmd_add_context() {
    local add_context_opts
    add_context_opts=$(lttng add-context --list-options)

    case $prev in
    --session|-s)
        _lttng_complete_sessions
        return
        ;;
    --channel|-c)
        return
        ;;
    --event|-e)
        return
        ;;
    --type|-t)
        return
        ;;
    esac

    case $cur in
    -*)
        COMPREPLY=( $(compgen -W "${add_context_opts}" -- $cur) )
        return
        ;;
    esac
}

The add-context command does not accept an --event option.

line 131:

_lttng_cmd_enableconsumer() {
    local enable_consumer_opts
        enable_consumer_opts=$(lttng enable-consumer --list-options)

    case $prev in
    --session|-s)
        _lttng_complete_sessions
        return
        ;;
    esac

    case $cur in
    -*)
        COMPREPLY=( $(compgen -W "${enable_consumer_opts}" -- $cur) )
        return
        ;;
    esac
}

The enable-consumer command has been withdrawn.

line 150:

_lttng_cmd_disableconsumer() {
    local disable_consumer_opts
        disable_consumer_opts=$(lttng disable-consumer --list-options)

    case $prev in
    --session|-s)
        _lttng_complete_sessions
        return
        ;;
    esac

    case $cur in
    -*)
        COMPREPLY=( $(compgen -W "${disable_consumer_opts}" -- $cur) )
        return
        ;;
    esac
}

The disable-consumer command has been withdrawn.

line 169:

_lttng_cmd_disable_event() {
    local disable_event_opts
    disable_channel_opts=$(lttng disable-event --list-options)

    case $prev in
    --session|-s)
        _lttng_complete_sessions
        return
        ;;
    --channel|-c)
        return
        ;;
    esac

    case $cur in
    -*)
        COMPREPLY=( $(compgen -W "${disable_event_opts}" -- $cur) )
        return
        ;;
    esac
}

Note the copy-paste error on line 171.

At line 240, a block needs to be added to cover the new snapshot command.

Actions

Also available in: Atom PDF