Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open_shell not working with nano or vim #1719

Closed
jmcgrath207 opened this issue Feb 17, 2018 · 5 comments
Closed

open_shell not working with nano or vim #1719

jmcgrath207 opened this issue Feb 17, 2018 · 5 comments

Comments

@jmcgrath207
Copy link

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
@bepetersn
Copy link

bepetersn commented Feb 19, 2018 via email

@bepetersn
Copy link

bepetersn commented Feb 19, 2018 via email

@jmcgrath207
Copy link
Author

jmcgrath207 commented Feb 20, 2018

@bepetersn Thanks for looking into this for me.

For any other people that come across this issue. Make the change in io.py found in here:

8efbff1

Let Hope this change is put in for Fabric V2

@jmcgrath207
Copy link
Author

Closing issue

@bitprophet
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants