Skip to main content
Sep 29, 2023 2:32 PM UTC

Backspace "misbehaving" in bash 5.1 while working fine in bash 4.2.53

Using Putty to access 2 different z/OS 2.4 images; Putty settings are same for each session save for the target IP address. On system with bash 4.2.53(2) backspace behavior works normally - content is deleted and cursor key backs up on screen to reflect that.  On system with bash 5.1.0(1) backspace deletes content from the buffer (but not the screen) and the cursor moves forward (sometimes more than a single character's worth).  On both systems using the native IBM supplied shell backspace works fine both before entering  bash and after exiting so the unexpected behavior seems to be pointing to bash 5.1.0(1).  Any pointers on where to look or what to change appreciated.  



------------------------------
Karl Huf
Senior Vice President, Mainframe Support
Northern Trust Company
Chicago IL US
------------------------------

    2 replies

    Sergey Rezepin
    Rocketeer
    Oct 4, 2023 4:54 AM UTC

    Using Putty to access 2 different z/OS 2.4 images; Putty settings are same for each session save for the target IP address. On system with bash 4.2.53(2) backspace behavior works normally - content is deleted and cursor key backs up on screen to reflect that.  On system with bash 5.1.0(1) backspace deletes content from the buffer (but not the screen) and the cursor moves forward (sometimes more than a single character's worth).  On both systems using the native IBM supplied shell backspace works fine both before entering  bash and after exiting so the unexpected behavior seems to be pointing to bash 5.1.0(1).  Any pointers on where to look or what to change appreciated.  



    ------------------------------
    Karl Huf
    Senior Vice President, Mainframe Support
    Northern Trust Company
    Chicago IL US
    ------------------------------

    Hi Karl,

    Could you try to setup TERMINFO environment variable? It should contain a real path to share/terminfo folder that was installed with Bash 5.1:
    export TERMINFO=<installation_path>/share/ebcdic/terminfo

    Please, let me know if it solves the problem.

    Thanks,
    Sergey



    ------------------------------
    Sergey Rezepin
    Rocket Software
    ------------------------------

    Manfred Lotz
    New Participant
    Oct 13, 2023 4:53 AM UTC

    Hi Karl,

    Could you try to setup TERMINFO environment variable? It should contain a real path to share/terminfo folder that was installed with Bash 5.1:
    export TERMINFO=<installation_path>/share/ebcdic/terminfo

    Please, let me know if it solves the problem.

    Thanks,
    Sergey



    ------------------------------
    Sergey Rezepin
    Rocket Software
    ------------------------------

    Hi Sergey,

    I am facing the same problem here. Setting TERMINO as suggested won't help. 

    It seems there was a problem between keyboard and chair.

    Setting TERMINFO like suggested works fine.

    Question: I have not set the TERM variable. Is it suggested to set it as well?

    -- 
    Manfred



    ------------------------------
    Manfred Lotz
    Kyndryl Deutschland GmbH
    Kelsterbach DE
    ------------------------------