[Emacs] Fix Eshell banner
Fix reference to undefined variable Fix incorrect calculation of usage percentage of memory
This commit is contained in:
parent
880a0e14df
commit
0a54b4d67f
@ -1664,7 +1664,7 @@ Now, we can get our partitions. For this, we’ll make a call to the shell comma
|
||||
(mount (nth 5 partition)))
|
||||
(when (s-prefix? "/dev" filesystem)
|
||||
(make-phundrak/mounted-partitions
|
||||
:path (if (> phundrak--max-length-path (length mount))
|
||||
:path (if (> phundrak//eshell-banner--max-length (length mount))
|
||||
mount
|
||||
(phundrak/abbr-path mount t))
|
||||
:size size
|
||||
@ -1724,7 +1724,7 @@ This function will be used in two distinct functions: ~phundrak/eshell-banner~ w
|
||||
(defun phundrak//eshell-banner--display-memory (type used total text-padding ramp-length)
|
||||
(let ((percentage (if (= used 0)
|
||||
0
|
||||
(/ total used))))
|
||||
(/ (* 100 used) total))))
|
||||
(concat (s-pad-right text-padding "." type)
|
||||
": "
|
||||
(phundrak//eshell-banner--progress-bar ramp-length
|
||||
|
Loading…
Reference in New Issue
Block a user