[Emacs] Fix issue with path in Eshell prompt
This commit fixes an issue with the macro `phundrak-var-or-if-nil' by removing it entirely. For some reason, it was broken in a previous commit, and the path did not show up in the prompt unless in a git repository. Now, `phundrak-var-or-if-nil' is removed entirely.
This commit is contained in:
parent
5819f1a6e8
commit
a1b234fa43
@ -1511,8 +1511,9 @@ giggles, I’ve made it so it is a powerline prompt.
|
||||
(dirty phundrak-nord11)
|
||||
(staged phundrak-nord13)
|
||||
(t phundrak-nord14)))
|
||||
(background (phundrak-var-or-if-nil $background-color
|
||||
phundrak-nord0)))
|
||||
(background (if $background-color
|
||||
$background-color
|
||||
phundrak-nord0)))
|
||||
(concat (with-face ""
|
||||
:background accent
|
||||
:foreground background)
|
||||
@ -1812,20 +1813,6 @@ return ~t~.
|
||||
t))
|
||||
#+END_SRC
|
||||
|
||||
**** ~phundrak-var-or-if-nil~
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: User-Configuration-Custom-functions-macros-and-variables-phundrak-var-or-if-nil-40e2e54a
|
||||
:END:
|
||||
This simple function helps me return either the value ~var~ holds, or if it is
|
||||
~nil~ it will return the value ~value~ holds (or will return).
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defmacro phundrak-var-or-if-nil (var value)
|
||||
"Return the result yield by `VALUE' if `VAR' is nil, return `VAR' otherwise."
|
||||
(if (null var)
|
||||
value
|
||||
var))
|
||||
#+END_SRC
|
||||
|
||||
**** ~phundrak-zip~
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: User-Configuration-Custom-functions-macros-and-variables-Elisp-Utilities-and-Predicates-phundrak-zip-8a49b20f
|
||||
@ -2486,7 +2473,7 @@ is required by Eshell with a hook:
|
||||
(setq eshell-banner-message (phundrak-eshell-banner))))
|
||||
#+END_SRC
|
||||
|
||||
**** Eshell theme
|
||||
**** Eshell theme and prompt
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: User_Configuration-Eshell-Eshell_theme-a06715a9
|
||||
:END:
|
||||
@ -2524,7 +2511,9 @@ otherwise, it is kept in full. It can be toggled with a keyboard shortcut, see
|
||||
($success phundrak-nord10)
|
||||
($error phundrak-nord11))
|
||||
(concat (with-face (concat " "
|
||||
(phundrak-abbr-path (phundrak-var-or-if-nil $git-path $path)
|
||||
(phundrak-abbr-path (if $git-path
|
||||
$git-path
|
||||
$path)
|
||||
phundrak-prompt--abbreviate)
|
||||
" ")
|
||||
:foreground $foreground
|
||||
|
Loading…
Reference in New Issue
Block a user