Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-5629

Add new karaf commands shell:elif and shell:else

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.1.5, 4.2.0.M2
    • Fix Version/s: 4.2.0
    • Component/s: karaf
    • Labels:
      None

      Description

      Take the following example:

      if {"$v" equals "a"} {
        do something a
      } {
        if {"$v" equals "b"} {
          do something b
        } {
          if {"$v" equals "c"} {
            do something c
          } {
            do something others
          }
        }
      }
      

      By introducing the commands shell:elif and shell:else, this can be simplified as follows:

      if {"$v" equals "a"} {
        do something a
      } elif {"$v" equals "b"} {
        do something b
      } elif {"$v" equals "c"} {
        do something c
      } else {
        do something others
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gnt Guillaume Nodet
                Reporter:
                lliao Lijun Liao
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: