Re: Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-13 Thread Norbert Gruener
Hi Jude, On 9/7/18 4:09 PM, Jude DaShiell wrote: > Try putting a -n switch on that echo command and I predict this problem > will go away. I am sorry, but adding the »-n« switch did not solve that problem. It is exactly the same behavior. Cheers, Norbert --

Re: Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-13 Thread Norbert Gruener
On 9/8/18 4:28 PM, Curt wrote: > On 2018-09-08, Stefan Krusche wrote: >> Am Samstag, 8. September 2018 schrieb Stefan Krusche: >>> Thanks for food for thought, David. The question why, and where exactly, >>> the different behaviour emerges, remains unanswered for me. It would be >>> interesting

Re: Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-08 Thread Thomas Schmitt
Hi, i wrote: > That's probably because there is bash-ism in the script, Of course i meant to say: That's probably because there is _no_ bash-ism in the script, Have a nice day :) Thomas

Re: Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-08 Thread Thomas Schmitt
Hi, David Wright wrote: > As I posted, I get the same behaviour whichever shebang I have, > any of bash|dash|sh. That's probably because there is bash-ism in the script, except the variable READLINE_LINE which the boss bash is supposed to have set. > If the script has no shebang, then (I

Re: Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-08 Thread Curt
On 2018-09-08, Stefan Krusche wrote: > Am Samstag, 8. September 2018 schrieb Stefan Krusche: >> Thanks for food for thought, David. The question why, and where exactly, >> the different behaviour emerges, remains unanswered for me. It would be >> interesting to know how the OP actually solved his

Re: Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-08 Thread Stefan Krusche
Am Samstag, 8. September 2018 schrieb Stefan Krusche: > Thanks for food for thought, David. The question why, and where exactly, > the different behaviour emerges, remains unanswered for me. It would be > interesting to know how the OP actually solved his problem. Just read it: OP *inserted* said

Re: Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-08 Thread Stefan Krusche
Am Freitag, 7. September 2018 schrieb David Wright: > On Fri 07 Sep 2018 at 18:40:51 (+0200), Stefan Krusche wrote: > > > With a shebang, the parent process of the script is reported as > > > /bin/dash /home/david/bin/_bash_man > > > (and the shell corresponds to the dash|bash|sh shebang). > > >

Re: Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-07 Thread David Wright
On Fri 07 Sep 2018 at 18:40:51 (+0200), Stefan Krusche wrote: > Am Freitag, 7. September 2018 schrieb David Wright: > > On Fri 07 Sep 2018 at 14:58:48 (+0200), Stefan Krusche wrote: > > > Am Freitag, 7. September 2018 schrieb Norbert Gruener: > > > > Hi Stefan, > > > > > > > > >>    

Re: Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-07 Thread Stefan Krusche
Am Freitag, 7. September 2018 schrieb David Wright: > On Fri 07 Sep 2018 at 14:58:48 (+0200), Stefan Krusche wrote: > > Am Freitag, 7. September 2018 schrieb Norbert Gruener: > > > Hi Stefan, > > > > > > >>    bash^[[D^[[C^[[B^[[A > > > > > > > > This reminds me of programs (ed, rcs, telnet etc.)

Re: Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-07 Thread mick crane
On 2018-09-07 11:07, Stefan Krusche wrote: Hallo Norbert, Am Donnerstag, 6. September 2018 schrieb Norbert Gruener: Hi all, In my Bash shell (».bashrc«) I have »bind« a command to the »F1« key bind -x '"\eOP":"_bash_man"'# F1 man The script »_bash_man« looks like (it is

Re: Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-07 Thread David Wright
On Fri 07 Sep 2018 at 14:58:48 (+0200), Stefan Krusche wrote: > Am Freitag, 7. September 2018 schrieb Norbert Gruener: > > Hi Stefan, > > > > >>    bash^[[D^[[C^[[B^[[A > > > > > > This reminds me of programs (ed, rcs, telnet etc.) which don't use > > > readline and have less command line editing

Re: Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-07 Thread Jude DaShiell
Try putting a -n switch on that echo command and I predict this problem will go away. On Thu, 6 Sep 2018, Norbert Gruener wrote: > Date: Thu, 6 Sep 2018 11:38:10 > From: Norbert Gruener > To: debianUsers > Subject: Bash-Problem with cursor position after calling a function with >

Re: [SOLVED} Re: Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-07 Thread Stefan Krusche
Am Freitag, 7. September 2018 schrieb Norbert Gruener: > Hi Stefan, > > you made my day!!! :-)) Nice. :-) Kind regards, Stefan PS: no need to CC me, I'm subscribed ;-)

[SOLVED} Re: Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-07 Thread Norbert Gruener
Hi Stefan, you made my day!!! :-)) On 9/7/18 2:58 PM, Stefan Krusche wrote: > > Maybe, just maybe... ;-) the cause lies in what you use as a shebang in your > script. If I do: > $ sh > I get a dash subshell on my system which has apparently no command line > editing > with readline

Re: Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-07 Thread Stefan Krusche
Am Freitag, 7. September 2018 schrieb Norbert Gruener: > Hi Stefan, > > >>    bash^[[D^[[C^[[B^[[A > > > > This reminds me of programs (ed, rcs, telnet etc.) which don't use > > readline and have less command line editing capabilities. Backspace > > should work, though. > > It is exactly my

Re: Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-07 Thread Norbert Gruener
Hi Stefan, On 9/7/18 12:07 PM, Stefan Krusche wrote: > Hallo Norbert, > > Am Donnerstag, 6. September 2018 schrieb Norbert Gruener: >> Hi all, >> >> In my Bash shell (».bashrc«) I have »bind« a command to the »F1« key >>bind -x '"\eOP":"_bash_man"'# F1 man >> >> The script

Re: Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-07 Thread Stefan Krusche
Hallo Norbert, Am Donnerstag, 6. September 2018 schrieb Norbert Gruener: > Hi all, > > In my Bash shell (».bashrc«) I have »bind« a command to the »F1« key >bind -x '"\eOP":"_bash_man"'# F1 man > > The script »_bash_man« looks like (it is simplified only for test reasons) > >

Re: Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-07 Thread Norbert Gruener
Hi Thomas, On 9/6/18 8:30 PM, Thomas Schmitt wrote: > Hi, > > Norbert Gruener wrote: >> after my upgrade to Stretch I got these problems :-( > > Did you already check whether it is a matter of the terminal program ? > If it is a bit rot problem between readline and terminal, then you > might

Re: Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-06 Thread Thomas Schmitt
Hi, Norbert Gruener wrote: > after my upgrade to Stretch I got these problems :-( Did you already check whether it is a matter of the terminal program ? If it is a bit rot problem between readline and terminal, then you might get lucky with a different one. Have a nice day :) Thomas

Re: Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-06 Thread Norbert Gruener
Hi Thomas, On 9/6/18 6:28 PM, Thomas Schmitt wrote: > Hi, > > i replayed this on Jessie. under Jessie this was working for me too. But after my upgrade to Stretch I got these problems :-( Cheers, Norbert --

Re: Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-06 Thread Thomas Schmitt
Hi, i replayed this on Jessie. I get printed lines "aaa" for every F1 i press. No shell prompts get printed inbetween, but rather the shell prompt and the text "aaa" stay in the base line of the xterm. The text "aaa" can be edited and the new text gets printed with F1. Like after three times

Bash-Problem with cursor position after calling a function with READLINE_LINE

2018-09-06 Thread Norbert Gruener
Hi all, In my Bash shell (».bashrc«) I have »bind« a command to the »F1« key bind -x '"\eOP":"_bash_man"'# F1 man The script »_bash_man« looks like (it is simplified only for test reasons) echo "${READLINE_LINE}" When I type »aaa« and then press »F1«, I see a new line on the