terminado icon indicating copy to clipboard operation
terminado copied to clipboard

Tab and up arrow functionality

Open ambarb opened this issue 8 years ago • 8 comments

In our implementation, tab and up arrow do not function as expected. It would be great if the tab key completed commands or file paths and if the up arrow allowed us to cycle through previous commands. CC @danielballan

ambarb avatar Mar 10 '16 16:03 ambarb

Tab and up arrow both work for me in the demo. Do you see the issue in the demo, or is it related to whatever you're integrating it into?

takluyver avatar Mar 10 '16 20:03 takluyver

the error occurs when using vim. it was integrated in jupyter notebook. the error output on server side:

Accept-Encoding': 'gzip, deflate, sdch', 'Pragma': 'no-cache', 'Upgrade': 'websocket', 'Sec-Websocket-Key': 'z1Xy7BENPtx14icF79USAg
==', 'Host': ':9000'})                                                                                  
    Traceback (most recent call last):                                                                                             
      File "/usr/local/lib/python3.4/dist-packages/tornado/web.py", line 1401, in _stack_context_handle_exception                  
        raise_exc_info((type, value, traceback))                                                                                   
      File "<string>", line 3, in raise_exc_info                                                                                   
      File "/usr/local/lib/python3.4/dist-packages/tornado/stack_context.py", line 314, in wrapped                                 
        ret = fn(*args, **kwargs)                                                                                                  
      File "/usr/local/lib/python3.4/dist-packages/terminado/management.py", line 186, in pty_read                                 
        s = ptywclients.ptyproc.read(65536)                                                                                        
      File "/usr/local/lib/python3.4/dist-packages/ptyprocess/ptyprocess.py", line 804, in read                                    
        return self.decoder.decode(b, final=False)                                                                                 
      File "/usr/lib/python3.4/codecs.py", line 319, in decode                                                                     
        (result, consumed) = self._buffer_decode(data, self.errors, final)                                                         
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbd in position 29: invalid start byte                                    

cailiang9 avatar Mar 16 '16 07:03 cailiang9

When pressing tab/up arrow? Or is that unrelated to the problem in this issue? Is it readily replicable?

takluyver avatar Mar 16 '16 10:03 takluyver

yes. all arrow keys do not function.

cailiang9 avatar Mar 16 '16 10:03 cailiang9

The original report from @ambarb relates to the JupyterHub deployment at Brookhaven National Lab. Maybe this is a problem with terminado + JupyterHub, or maybe it is a problem with our particular deployment. I'll look into it and provide more details if the issue seems to be with terminado.

I'm not sure whether or not it is related to the vim issue reported by @cailiang9, who AFAIK is working in a different deployment. @cailiang9, can you provide more detail about what you mean by "do not function"? Do you see unprintable characters when you press arrow keys in the bash terminal?

danielballan avatar Mar 17 '16 00:03 danielballan

In vim of terminal, when I press arrow keys, the arrow can not move and the backend server prints the above exceptions.

cailiang9 avatar Mar 17 '16 02:03 cailiang9

I am able to use arrow keys and tab in vim on my system (Linux, Firefox, British keyboard).

takluyver avatar Mar 17 '16 15:03 takluyver

@takluyver I am still facing this issue. Arrow keys are not working with vim in insert mode when I'm trying to edit files

eldos-dl avatar Jul 07 '20 10:07 eldos-dl