Open a shell buffer in (or relative to)
e.g. whatever directory the current buffer is in. If you have
find-file-in-project installed, you can also move
around relative to the root of the current project.
I use Emacs shell buffers for everything, and shell-here is great for getting where you need to quickly. Projectile / FFIP integration makes it very easy to manage multiple shells and maintain your path / history / scrollback when switching between projects.
(require 'shell-here) (define-key (current-global-map) "\C-c!" 'shell-here)
|Open a shell in the current directory|
|Open a shell one level up from current|
|Open a shell two levels up from current (etc)|
|Open a new shell in the current directory|
|Open a shell in the current project root|
|Open a shell one level up from root|
|Open a shell two levels up from root (etc)|
|Open a new shell in the project root|
There are two things you can configure, both dealing with how
shell-here determines the root of the project you’re in.
shell-here-project-root-functions. This variable contains a list of functions to determine the root of the project. The first one that’s bound will be called with no arguments. The first truthy value returned will be the root.
shell-here-project-root-functionsis nil or doesn’t produce a truthy value,
locate-dominating-filewill be called for each entry in this variable, until one returns a truthy value.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.