Edit Multiline Text

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Edit Multiline Text

Matthias
Hi,

I want to use a custom command in karaf to edit a text with multiline "\n".

My problem is not to set a multiline text, because this works fine with
quotation (") at start and then add the wanted text.

My problem is to "reload" the text, so it can be edited again. If i add it
to a completer then the edit exits karaf with a string out of range
exception.

Is there a way to re-edit multilined text? How should i pass it to the
command?

Regards,
Matthias



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: Edit Multiline Text

jbonofre
Hi,

You can take a look how we implemented the less command for instance (or vi/edit). It’s pretty close to what you are looking for.

Regards
JB

> Le 24 févr. 2020 à 20:03, Matthias <[hidden email]> a écrit :
>
> Hi,
>
> I want to use a custom command in karaf to edit a text with multiline "\n".
>
> My problem is not to set a multiline text, because this works fine with
> quotation (") at start and then add the wanted text.
>
> My problem is to "reload" the text, so it can be edited again. If i add it
> to a completer then the edit exits karaf with a string out of range
> exception.
>
> Is there a way to re-edit multilined text? How should i pass it to the
> command?
>
> Regards,
> Matthias
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Reply | Threaded
Open this post in threaded view
|

Re: Edit Multiline Text

Matthias
Hi JB, can you give me a hint where i find the source.

At https://github.com/apache/karaf/search?q=less&unscoped_q=less i not
find the command.

Regards, MW

Am 24.02.20 um 21:02 schrieb Jean-Baptiste Onofre:

> Hi,
>
> You can take a look how we implemented the less command for instance (or vi/edit). It’s pretty close to what you are looking for.
>
> Regards
> JB
>
>> Le 24 févr. 2020 à 20:03, Matthias <[hidden email]> a écrit :
>>
>> Hi,
>>
>> I want to use a custom command in karaf to edit a text with multiline "\n".
>>
>> My problem is not to set a multiline text, because this works fine with
>> quotation (") at start and then add the wanted text.
>>
>> My problem is to "reload" the text, so it can be edited again. If i add it
>> to a completer then the edit exits karaf with a string out of range
>> exception.
>>
>> Is there a way to re-edit multilined text? How should i pass it to the
>> command?
>>
>> Regards,
>> Matthias
>>
>>
>>
>> --
>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

--
Matthias Wegner
Hauptstrasse 41a
79199 Kirchzarten
Tel.: 07661 9091000
Mobil: 0716 47893182

Reply | Threaded
Open this post in threaded view
|

Re: Edit Multiline Text

jbonofre
Hi,

Less or nano commands are part of gogo jline posix:


Regards
JB

Le 24 févr. 2020 à 21:31, Matthias Wegner <[hidden email]> a écrit :

Hi JB, can you give me a hint where i find the source.

At https://github.com/apache/karaf/search?q=less&unscoped_q=less i not
find the command.

Regards, MW

Am 24.02.20 um 21:02 schrieb Jean-Baptiste Onofre:
Hi,

You can take a look how we implemented the less command for instance (or vi/edit). It’s pretty close to what you are looking for.

Regards
JB

Le 24 févr. 2020 à 20:03, Matthias <[hidden email]> a écrit :

Hi,

I want to use a custom command in karaf to edit a text with multiline "\n".

My problem is not to set a multiline text, because this works fine with
quotation (") at start and then add the wanted text.

My problem is to "reload" the text, so it can be edited again. If i add it
to a completer then the edit exits karaf with a string out of range
exception.

Is there a way to re-edit multilined text? How should i pass it to the
command?

Regards,
Matthias



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

--
Matthias Wegner
Hauptstrasse 41a
79199 Kirchzarten
Tel.: 07661 9091000
Mobil: 0716 47893182