help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cisco Router Tab Completion in SSH from Emacs


From: ISHIKAWA,chiaki
Subject: Re: Cisco Router Tab Completion in SSH from Emacs
Date: Sun, 01 Dec 2013 23:56:50 +0900
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20131118 Thunderbird/17.0.11

(2013/12/01 10:36), Esben Stien wrote:
> Barry Margolin <barmar@alum.mit.edu> writes:
> 
>> I'm still running 22.x, but M-x term has always been short for M-x
>> terminal-emulator -- it's just command completion.
> 
> Right, and running this way it kind of useless, since it makes emacs
> inaccessible since everything is sent to the terminal. I could just as
> well run it outside emacs. So, I guess we abandon this approach.
> 
>> You can type C-q TAB, but it won't be sent until you enter the command
>> line.
> 
> Until I enter the command line? I don't understand this sentence.
> 
> C-q runs the command quoted-insert, which is an interactive compiled
> Lisp function in `simple.el'.
> 
> It is bound to C-q.
> 
> If I enter this in an eshell ssh session, nothing happens, at all. It
> just jumps forward like hitting TAB usually does.
> 

I just checked.
I logged into a local router with a CLI that supports cisco-like command
completion feature.

I used telnet.
In my case, I run M-x term and when it asks for
Run program: bash
I delete bash and inserts telnet and runs telent directly.
I think this is the key here.

This puts me in a mode where the emacs  basically captures all the
character code that is entered into telnet program.
(For example, C-x C-b to bring up dir-mode doesn't take effect.
Presumably it is all sent to the terminal program?
I can't seem to get out of this behavior of this frame/window untill
telnet is finished. So better run this "M-x term" in a separate frame, I
think. If I run "M-X term" in a new-frame, the other existing frame is
not affected by this behavior, so I can run other emacs commands there.

With running telnet directory, I did get
cisco-like completion from the router.


Yes, I am familiar with the issues mentioned because I was
not able to use cisco IOS like completion when I ran ssh from eshell
session.

I suspect what you need to do is to run "ssh" (or whatever binary that
invokes shell on your computer) when "M-x term" asks you about what
program it should run.

Hope this helps.








reply via email to

[Prev in Thread] Current Thread [Next in Thread]