Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #199873

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

From mick crane <mick.crane@gmail.com>
Newsgroups linux.debian.user
Subject Re: Bash-Problem with cursor position after calling a function with READLINE_LINE
Date 2018-09-07 18:10 +0200
Message-ID <wvruy-2ee-7@gated-at.bofh.it> (permalink)
References <wv510-5OE-7@gated-at.bofh.it> <wvlSa-7lY-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <command>
>> 
>> The script »_bash_man«  looks like (it is simplified only for test 
>> reasons)
>> 
>>    echo "${READLINE_LINE}"
> 
> I tried exactly that and it seems to work. I put only that one line in
> a script,
> assigned the F1 key with bind to it and it outputs just the string I 
> typed
> before when I hit F1 like intended. No problems with cursor movements,
> backspace and any other command line editing.
> 
> I'm on Devuan ascii and run GNU bash, Version 4.4.12(1)-release
> (x86_64-pc-linux-gnu)
> 
>>    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.

Had something similar with vi a while back.
put
"set nocompatible
set backspace=indent,eol,start"

or something
in .vimrc

https://vi.stackexchange.com/questions/2162/why-doesnt-the-backspace-key-work-in-insert-mode

-- 
Key ID    4BFEBB31

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Bash-Problem with cursor position after calling a function with  READLINE_LINE Norbert Gruener <norbert@norbert-gruener.de> - 2018-09-06 18:10 +0200
  Re: Bash-Problem with cursor position after calling a function with READLINE_LINE "Thomas Schmitt" <scdbackup@gmx.net> - 2018-09-06 18:30 +0200
    Re: Bash-Problem with cursor position after calling a function with  READLINE_LINE Norbert Gruener <norbert@norbert-gruener.de> - 2018-09-06 18:50 +0200
      Re: Bash-Problem with cursor position after calling a function with READLINE_LINE "Thomas Schmitt" <scdbackup@gmx.net> - 2018-09-06 20:40 +0200
        Re: Bash-Problem with cursor position after calling a function with  READLINE_LINE Norbert Gruener <norbert@norbert-gruener.de> - 2018-09-07 08:40 +0200
  Re: Bash-Problem with cursor position after calling a function with READLINE_LINE Stefan Krusche <linux@stefan-krusche.de> - 2018-09-07 12:10 +0200
    Re: Bash-Problem with cursor position after calling a function with  READLINE_LINE Norbert Gruener <norbert@norbert-gruener.de> - 2018-09-07 14:50 +0200
      Re: Bash-Problem with cursor position after calling a function with READLINE_LINE Stefan Krusche <linux@stefan-krusche.de> - 2018-09-07 15:00 +0200
        [SOLVED} Re: Bash-Problem with cursor position after calling a  function with READLINE_LINE Norbert Gruener <norbert@norbert-gruener.de> - 2018-09-07 15:20 +0200
          Re: [SOLVED} Re: Bash-Problem with cursor position after calling a function with READLINE_LINE Stefan Krusche <linux@stefan-krusche.de> - 2018-09-07 15:30 +0200
        Re: Bash-Problem with cursor position after calling a function with  READLINE_LINE David Wright <deblis@lionunicorn.co.uk> - 2018-09-07 16:50 +0200
          Re: Bash-Problem with cursor position after calling a function with READLINE_LINE Stefan Krusche <linux@stefan-krusche.de> - 2018-09-07 18:40 +0200
            Re: Bash-Problem with cursor position after calling a function with  READLINE_LINE David Wright <deblis@lionunicorn.co.uk> - 2018-09-07 20:50 +0200
              Re: Bash-Problem with cursor position after calling a function with READLINE_LINE Stefan Krusche <linux@stefan-krusche.de> - 2018-09-08 12:50 +0200
                Re: Bash-Problem with cursor position after calling a function with READLINE_LINE Stefan Krusche <linux@stefan-krusche.de> - 2018-09-08 13:00 +0200
                Re: Bash-Problem with cursor position after calling a function with  READLINE_LINE Curt <curty@free.fr> - 2018-09-08 16:40 +0200
                Re: Bash-Problem with cursor position after calling a function with  READLINE_LINE Norbert Gruener <norbert@norbert-gruener.de> - 2018-09-13 12:30 +0200
              Re: Bash-Problem with cursor position after calling a function with READLINE_LINE "Thomas Schmitt" <scdbackup@gmx.net> - 2018-09-08 17:10 +0200
                Re: Bash-Problem with cursor position after calling a function with READLINE_LINE "Thomas Schmitt" <scdbackup@gmx.net> - 2018-09-08 18:20 +0200
    Re: Bash-Problem with cursor position after calling a function with  READLINE_LINE mick crane <mick.crane@gmail.com> - 2018-09-07 18:10 +0200
  Re: Bash-Problem with cursor position after calling a function with  READLINE_LINE Jude DaShiell <jdashiel@panix.com> - 2018-09-07 16:20 +0200
    Re: Bash-Problem with cursor position after calling a function with  READLINE_LINE Norbert Gruener <norbert@norbert-gruener.de> - 2018-09-13 12:30 +0200

csiph-web