Skip to content

daviderestivo/load-bash-alias

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 

Repository files navigation

load-bash-alias

License: GPL v3 MELPA

Convert bash aliases into eshell ones.

Installation

Manual

  1. Download and copy load-bash-alias.el into ~/.emacs.d/lisp directory.
  2. Add the following elisp code to your Emacs config:
;; Tell Emacs where is your personal elisp lib directory
(add-to-list 'load-path "~/.emacs.d/lisp/")

;; load-bash-alias
;; https://github.com/daviderestivo/load-bash-alias
(load-library "load-bash-alias")
  1. Call load-bash-alias-load-bash-alias-into-eshell interactive function to convert bash aliases into eshell ones:
M-x load-bash-alias-load-bash-alias-into-eshell

Melpa

Add the following elisp snippet to your init.el:

(use-package load-bash-alias
  :ensure t
  :config
  (setq load-bash-alias-bashrc-file "~/.bashrc")
  (setq load-bash-alias-exclude-aliases-regexp "^alias magit\\|^alias oc"))

Customization

The location of your barshrc file can be customized by setting the value of load-bash-alias-bashrc-file variable:

(setq load-bash-alias-bashrc-file "~/.bashrc")

In case you want to add more alias files please add them to bash-alias-additional-aliases-files. For example:

(setq load-bash-alias-additional-aliases-files '("~/.dotfiles/bashrc_addons"))

In addition it's possible to exclude certain bash aliases to be converted into eshell ones simply setting load-bash-alias-exclude-aliases-regexp:

(setq load-bash-alias-exclude-aliases-regexp "^alias magit\\|^alias oc")

Credits

The original ideas for this package has been taken from Skye. The original elisp code can be found here.

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •