Skip to content

Commit

Permalink
gprof: _parse_usage, drop hardcoded option list
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Jul 13, 2019
1 parent 29ad382 commit bebe43d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 1 addition & 9 deletions completions/gprof
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,7 @@ _gprof()
$split && return

if [[ $cur == -* ]]; then
COMPREPLY=( $(compgen -W '--annotated-source --brief --exec-counts
--file-info --directory-path --no-annotated-source --print-path
--flat-profile --no-flat-profile --graph --no-graph --table-length=
--separate-files --no-exec-counts --function-ordering
--file-ordering --traditional --width= --all-lines --demangle
--no-demangle --no-static --static-call-graph
--ignore-non-functions -k --line --min-count= --time= --no-time=
--external-symbol-table= --display-unused-functions --debug --help
--file-format= --sum --version' -- "$cur") )
COMPREPLY=( $(compgen -W '$(_parse_usage "$1")' -- "$cur") )
[[ $COMPREPLY == *= ]] && compopt -o nospace
return
fi
Expand Down
2 changes: 1 addition & 1 deletion test/t/test_gprof.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@


class TestGprof:
@pytest.mark.complete("gprof --", xfail="! gprof --help &>/dev/null")
@pytest.mark.complete("gprof --", require_cmd=True)
def test_1(self, completion):
assert completion

0 comments on commit bebe43d

Please sign in to comment.