Ticket #79 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Inconsistent function calls to print_help

Reported by: blee Owned by: blee
Priority: major Milestone: confman-1.9.3
Component: confman Version: 1.9.2b
Keywords: Cc:

Description

The calls to print_help:

blee@lancer.b1c1l1 ~/src/confman/trunk $ grep print_help confman.in
                print_help 1
            print_help 1
            print_help 1
            print_help 1
        h) shift ; print_help "$@" ; conf_cleanExit 0 ;;
    help )                          print_help "$@" ; conf_cleanExit 0 ;;

don't quite line up with what it expects as arguments:

  case $1 in
return $2

This also breaks 'confman help' calls that specify more than one argument:

blee@civic.b1c1l1 ~ $ confman help recipe list
confman manages configuration files

Usage:
  confman recipe [ get | list ]
  confman recipe [ create | edit | print | remove | set ] recipe_name

The recipe command provides an interface to manage confman recipes.

    create      Create a recipe with the given name
    edit        Edit a recipe with the given name
    get         Print the host's recipe
    list        List all recipes
    print       Print the given recipe
    remove      Delete a recipe with the given name
    set         Set the host's recipe to the given name

Recipe

confman[44711]: blee: /usr/local/share/confman/confmandoc.sh: line 508: return: list: numeric argument required

Change History

comment:1 Changed 2 years ago by blee

(In [443]) Fix multiple calls to print_help that were intended to call print_usage.

See #79

comment:2 Changed 2 years ago by blee

(In [444]) print_help doesn't expect to receive an rc from its caller.

See #79

comment:3 Changed 2 years ago by blee

(In [445]) print_help doesn't expect to receive an rc from its caller.

See #79

comment:4 Changed 2 years ago by blee

  • Status changed from new to closed
  • Resolution set to fixed

(In [448]) Merge from trunk multiple help-related fixes.

Fixes #75, #78, #79

comment:5 Changed 2 years ago by blee

  • Status changed from closed to reopened
  • Resolution fixed deleted

comment:6 Changed 2 years ago by blee

  • Owner changed from confman-developers@… to blee
  • Status changed from reopened to accepted

comment:7 Changed 2 years ago by blee

  • Status changed from accepted to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.