Giter VIP home page Giter VIP logo

neale-ssh.el's Introduction

What This Is

It's a lightweight SSH mode for Emacs. I used this a whole lot at my last job, which required me bouncing through lots of hops to get to a destination. Other SSH modes were failing me here, unable to keep up with dirtrack and other things. I just wanted a slim comint wrapper.

Put another way: I like Plan 9's acme. If you like Plan 9's acme, you might enjoy this.

Why You Should Use This

  • You have to use strange SSH implementations like like HP iLOs
  • You could benefit from a client that bunches up input by line (for instance, you have a high-latency connection and hate being 20 keystrokes ahead of what's echoed back)
  • You need an SSH implementation for Emacs that's fully debugged with putty on Windows
  • You'd like to have a working dabbrev-expand (M-/) in your shell sessions
  • You think it would be nice to have instant search over your entire session, even if it spans multiple hosts
  • You're a weirdo
  • You're a fan of cmd in acme

Why You Should Not Use This

  • You rely heavily on tab completion and can't switch to dabbrev-expand (M-/)
  • You use lots of things that absolutely require a terminal emulator (like Nethack or irssi)
  • You love using more and less more than you love using cat and Emacs built-in navigation

What's wrong with TRAMP?

Nothing's wrong with TRAMP. But in my job, I frequently have to be three or four shells deep, sometimes with login methods that TRAMP doesn't support. This lets me stop having to care about TRAMP, and just do what I'd do with an xterm (but with all the benefits for high-latency connections and history mentioned above). For instance:

  1. ssh host-a
  2. ipmi host-b sol activate
  3. open bizarre proprietary shell on host-c
  4. edit a file

How To Use This

Drop it somewhere that you can load it up. Then, in your emacs initialization file:

(load "neale-ssh.el")
(setq ssh/default-host "woozle.org")
(setq ssh/frequent-hosts '("woozle.org" "zork.net"))

Things I've Found Useful

Using plink/putty

I have to work in Windows sometimes, which means I'm using plink.exe. I created an "emacs" profile in putty that has everything set up the way I want for plink. Then I tell emacs to use it:

(setq ssh-explicit-args (if (eq system-type 'windows-nt) '("-load" "emacs") '()))

Editing Remote Files

At some point after starting to use this, you are going to find yourself wanting to edit a remote file, and then you are going to scratch your head.

You could use cat filename, edit the text straight up in the ssh buffer, then cat > filename to write it back out.

I've been using ed a lot, which combined with emacs editing isn't too bad (but also not fantastic).

A New Hope For Remote File Editing

I've been trying to get some key bindings set up that will:

  • Dump the remote file
  • Capture the dump in a new buffer
  • Bind something in the new buffer to send a cat > $original_filename command and dump the output

But I'm having quite a bit of trouble with Emacs dropping characters for some reason. If you're interested in helping, have a look at neale-comint-edit.el and see what you can twiddle out of it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.