Emacs shell management
Emacs Lisp
Latest commit 4ee06b8 Feb 15, 2017 killdash9 updated documentation
Permalink
Failed to load latest commit information.
LICENSE first commit Aug 24, 2016
README.md documenting new functions Feb 5, 2017
better-shell.el updated documentation Feb 15, 2017

README.md

better-shell

This package simplifies shell management and sudo access by providing the following commands.

better-shell-shell

Cycle through existing shell buffers, in order of recent use. If there are no shells, one is created.

With C-u prefix arg, invoke better-shell-for-current-dir.

better-shell-for-current-dir

Bring up a shell on the same host and in the same directory as the current buffer, choosing an existing shell if possible. The shell chosen is guaranteed to be idle (not currently running a command). It first looks for an idle shell that is already in the buffer's directory. If none is found, it looks for another idle shell on the same host as the buffer. If one is found, that shell is selected and automatically placed into the buffer's directory with a cd command. Otherwise, a new shell is created on the same host and in the same directory as the buffer.

better-shell-remote-open

Open a shell on a remote server, allowing you to choose from any host you've previously logged into (uses your ~/.ssh/known_hosts file) or enter a new host. With C-u prefix arg, get sudo shell.

better-shell-sudo-here

Reopen the current file, directory, or shell as root.

Installation

Melpa Installation

MELPA

M-x package-install RET better-shell RET

Then add key bindings to your config, for example:

(global-set-key (kbd "C-'") 'better-shell-shell)
(global-set-key (kbd "C-;") 'better-shell-remote-open)

use-package Installation

(use-package better-shell
    :ensure t
    :bind (("C-'" . better-shell-shell)
           ("C-;" . better-shell-remote-open)))