question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

open_shell not working with nano or vim

See original GitHub issue

I am having this weird issue when I use open_shell() with nano.

The arrow keys do not seem to work right. When I use the up arrow, for example, nothing happens the first press and the second press gives me the letter ‘A’

This issue also appeared with vim as well.

I was able to capture this in motion when I use the showkey -a command below.

I am currently using Fabric3 1.14.post1

## When Ran with open_shell(command='nano  /home/pi/.piHoleRestore/01-pihole.conf.old')
# THen I exit the Nano Editor

pi@raspberrypi:~$ showkey -a


^[       27 0033 0x1b # Up First arrow Key Press
[        91 0133 0x5b # Up Second Arrow Press
A        65 0101 0x41 #
^[       27 0033 0x1b # Down First arrow Key Press
[        91 0133 0x5b # Down Second Arrow Press
B        66 0102 0x42 #
^[       27 0033 0x1b # Left First arrow Key Press
[        91 0133 0x5b # Left Second Arrow Press
D        68 0104 0x44 # 
^[       27 0033 0x1b # Right First arrow Key Press
[        91 0133 0x5b # Right Second Arrow Press
C        67 0103 0x43 #


# WHen ran with normal ssh session

pi@raspberrypi:~$ showkey -a


^[[A     27 0033 0x1b # Up Arrow
         91 0133 0x5b
         65 0101 0x41
^[[D     27 0033 0x1b # Down Arrow
         91 0133 0x5b
         68 0104 0x44
^[[B     27 0033 0x1b # Left Arrow
         91 0133 0x5b
         66 0102 0x42
^[[C     27 0033 0x1b # Right Arrow
         91 0133 0x5b
         67 0103 0x43

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
bitprophetcommented, Feb 22, 2018

Historical note, this sort of thing works significantly better in Invoke and thus the upcoming Fabric 2. I routinely use vim via run() in that codebase.

1reaction
bepetersncommented, Feb 19, 2018

As you read along in that issue history a potential, not-accepted fix was suggested that you could try. It’s just one line.

On Feb 19, 2018 10:56 AM, “Brian Peterson” bepetersn@gmail.com wrote:

See https://github.com/fabric/fabric/issues/196, this is a known (and IIRC de-prioritized?) issue. I think it’s useful to have some of the problem documented though. I really find it annoying myself.

On Feb 16, 2018 11:48 PM, “John McGrath” notifications@github.com wrote:

I am having this weird issue when I use open_shell() with nano.

The arrow keys do not seem to work right. When I use the up arrow, for example, nothing happens the first press and the second press gives me the letter ‘A’

This issue also appeared with vim as well.

I was able to capture this in motion when I use the showkey -a command below.

I am currently using Fabric3 1.14.post1

When Ran with open_shell(command=‘nano /home/pi/.piHoleRestore/01-pihole.conf.old’)

THen I exit the Nano Editor

pi@raspberrypi:~$ showkey -a

^[ 27 0033 0x1b # Up First arrow Key Press [ 91 0133 0x5b # Up Second Arrow Press A 65 0101 0x41 # ^[ 27 0033 0x1b # Down First arrow Key Press [ 91 0133 0x5b # Down Second Arrow Press B 66 0102 0x42 # ^[ 27 0033 0x1b # Left First arrow Key Press [ 91 0133 0x5b # Left Second Arrow Press D 68 0104 0x44 # ^[ 27 0033 0x1b # Right First arrow Key Press [ 91 0133 0x5b # Right Second Arrow Press C 67 0103 0x43 #

WHen ran with normal ssh session

pi@raspberrypi:~$ showkey -a

^[[A 27 0033 0x1b # Up Arrow 91 0133 0x5b 65 0101 0x41 ^[[D 27 0033 0x1b # Down Arrow 91 0133 0x5b 68 0104 0x44 ^[[B 27 0033 0x1b # Left Arrow 91 0133 0x5b 66 0102 0x42 ^[[C 27 0033 0x1b # Right Arrow 91 0133 0x5b 67 0103 0x43

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fabric/fabric/issues/1719, or mute the thread https://github.com/notifications/unsubscribe-auth/ABUzl55nzK_drLV4Q8bYs9Azzn1UXZHzks5tVnY2gaJpZM4SJN4T .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tip: Menu and functions to open shell (remote or local ... - Reddit
Have a menu of local and remote shells (I have _dozens_ I hit each day), with 'scripted login'; akin to the usual ssh...
Read more >
FIXED Open Shell Not Working in Windows 11 | PC Error Fix
Watch our video #tutorial and follow the fixes shown to fix # OpenShell Not Working in #windows11 problem.For detailed step-by-step ...
Read more >
Version 4.4.170 Update - File not Opening #1021 - GitHub
So I came here. Expected behavior. Installation of update as usual. Version: Open-Shell: 4.4.1170; OS: e.g. Windows 11 Home 21H2.
Read more >
Text Mode Editors: Vim, Emacs, Nano - Hyperpolyglot
vim emacs nano launch $ vim $ emacs $ nano open file $ vim file $ emacs file $ nano file open file on line 100...
Read more >
Linux Terminal - Text Editors - Computer Science
When you are first getting started, you can use nano to edit files. ... To quit vim, make sure you are not in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found