GithubHelp home page GithubHelp logo

eshell-toggle's Introduction

Simple functionality to show/hide eshell/ansi-term (or almost any other buffer, see eshell-toggle-init-function description below) at the bottom of active window with directory of its buffer.

Installation

(add-to-list 'load-path "/path/to/eshell-toggle.el")
(require 'eshell-toggle)
(global-set-key (kbd "s-`") 'eshell-toggle)

or using use-package and quelpa:

(use-package eshell-toggle
  :custom
  (eshell-toggle-size-fraction 3)
  (eshell-toggle-find-project-root-package t) ;; for projectile
  ;;(eshell-toggle-find-project-root-package 'projectile) ;; for projectile
  ;; (eshell-toggle-use-projectile-root 'project) ;; for in-built project.el
  (eshell-toggle-run-command nil)
  (eshell-toggle-init-function #'eshell-toggle-init-ansi-term)
  :quelpa
  (eshell-toggle :repo "4DA/eshell-toggle" :fetcher github :version original)
  :bind
  ("s-`" . eshell-toggle))

Customization

  • eshell-toggle-size-fraction (NB: eshell-toggle-height-fraction is obsolete since 0.10.0) Proportion of parent window size (see eshell-toggle-window-side below) and eshell window;

  • eshell-toggle-window-side - Where to open eshell window, a value can be 'below' (default), 'above, 'right or 'left;

  • eshell-toggle-default-directory Default directory to open eshell at if buffer has no associated file;

  • eshell-toggle-name-separator String to separate directory paths when giving a name to buffer.

  • eshell-toggle-use-projectile-root is obsolete since 0.10.1, use the following eshell-toggle-find-project-root-package instead.

  • eshell-toggle-find-project-root-package If set to 'project it tries to use the built-in project to open an eshell at project root, if set to 'projectile or t it uses projectile, and if set to nil it detects the current directory.

  • eshell-toggle-run-command - command to run in a new shell.

  • eshell-toggle-init-function is a function to initialize toggled buffer, default one is eshell-toggle-init-eshell, but can be any function which takes a directory as an argument and creates a buffer, ootb there are eshell-toggle-init-eshell, eshell-toggle-init-ansi-term and eshell-toggle-init-tmux (you have to have tmux binary in your PATH), dired and magit-status work too.

  • eshell-toggle-init-term-char-mode If not nil eshell-toggle starts ansi-term based buffers in term-char-mode

If you want to change these on a per-directory basis, you can use .dir-locals.el magic:

((nil . ((eshell-toggle-init-function . eshell-toggle-init-ansi-term))))

eshell-toggle's People

Contributors

04a391c1b7aa avatar 4da avatar a13 avatar csbigdatahub avatar dreamcreated avatar juergenhoetzel avatar keyehzy avatar leungbk avatar ponimas avatar sirikid avatar syohex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

eshell-toggle's Issues

Exit eshell after closing the toggle

Can we add a user option to automatically exit eshells after closing the toggle?
My issue with current behaviour is that after a while I have man directory specific eshells piling up that I have to manually close via sth like ibuffer

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.