EshellAutojump

Last edit

Summary: (setq eshell-last-dir-ring-size 500)

Added:

> (setq eshell-last-dir-ring-size 500)


This is an eshell extension to facilitate directory switching.

Use ‘j’ to list your favorite directories (as determined by your usage of ‘cd’). Use ‘j regexp’ to jump to your most favorite directory matching the regular expression.

The list of directories is based on ‘eshell-last-dir-ring’ which gets saved in ~/.eshell/lastdir. You can increase the ring size by setting ‘eshell-last-dir-ring-size’.

Note that the standard eshell comes with a very similar mechanism based on the same ring of directories:

To view the ring: `cd =’
Changing to an index within the ring: ‘cd -4’
Note that ‘cd -’ is the same as ‘cd -0’
Use a regular expression: `cd =regexp’

The only benefit autojump offers is that it sorts the entries by how often you switched there instead of when you switched there. Perhaps this is good enough for you, making autojump unnecessary.

(eval-after-load 'eshell
  '(require 'eshell-autojump nil t))

(setq eshell-last-dir-ring-size 500)

CategoryEshell