0

I would like to know if it is possible to show only last directory in eShell (Emacs Shell). For example, It's currently in path /home/user/Programming/C++. With current setup of eshell, ~/Programming/C++ $, but I would like to show only this: C++ $.

Thanks

class_OpenGL
  • 185
  • 1
  • 10

1 Answers1

1

Yes, it's possible - the prompt is generated by function stored in the eshell-prompt-function variable. You can redefine it to whatever you want. You can define it something like: (lambda () (concat (car (last (split-string (eshell/pwd) "/"))) " $ "))

See EmacsWiki for examples.

Alex Ott
  • 80,552
  • 8
  • 87
  • 132