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

Provide the ability to edit text resources from the Karaf shell

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4.0, 3.0.0
    • Component/s: karaf-shell
    • Labels:
      None

      Description

      It would be awesome if we could edit text resources from inside the Karaf shell.

      Why?
      i) Because I won't have to quit the console, or open a new term/ssh session to modify the resource.
      ii) Editing config files via config:edit or jaas:manage, is workable but not perfect.
      iv) Configs are not only cfg files, in many cases we also have xml (jetty.xml, broker.xml, hazelcast.xml).
      iv) Integrating such feature with the url handlers would just rock (e.g. modify the content of cloud blob or a zookeeper znode, without having to manually copy the content locally edit and reupload).

      How?
      I haven't found so far a decent oss console based editor in java. So, our best bet is to integrate with console editors already present in the system (e.g. vi, nano, emacs, edit etc).

      1. KARAF-20441.patch
        11 kB
        Ioannis Canellos
      2. KARAF-2044-2.patch
        10 kB
        Ioannis Canellos
      3. KARAF-2044-karaf_2_3_x.patch
        11 kB
        Ioannis Canellos
      4. KARAF-2044-karaf_trunk.patch
        9 kB
        Ioannis Canellos

        Activity

        Hide
        iocanel Ioannis Canellos added a comment -

        I am attaching a really early draft of the implementation for anyone that's eager to try it out.

        Show
        iocanel Ioannis Canellos added a comment - I am attaching a really early draft of the implementation for anyone that's eager to try it out.
        Hide
        iocanel Ioannis Canellos added a comment -

        Added a second version, that reuses the StreamPumpStreamHandler.

        Show
        iocanel Ioannis Canellos added a comment - Added a second version, that reuses the StreamPumpStreamHandler.
        Hide
        jbonofre Jean-Baptiste Onofré added a comment -

        jledit has been included in 3.0.0.RC1. I just let this Jira open for review.

        Show
        jbonofre Jean-Baptiste Onofré added a comment - jledit has been included in 3.0.0.RC1. I just let this Jira open for review.
        Hide
        iocanel Ioannis Canellos added a comment -

        I think that we left this open for very long.
        Since it's already part of the 3.x branch and it has been released as 3.0 rc I think we can resolve it.

        Show
        iocanel Ioannis Canellos added a comment - I think that we left this open for very long. Since it's already part of the 3.x branch and it has been released as 3.0 rc I think we can resolve it.

          People

          • Assignee:
            iocanel Ioannis Canellos
            Reporter:
            iocanel Ioannis Canellos
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development