Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
955a27f606
|
|||
|
494a90dcb1
|
@@ -34,7 +34,7 @@ macOS. PR are welcome if you want to fix that!
|
|||||||
Version ~0.7.0~ renames several functions to conform with the Elisp
|
Version ~0.7.0~ renames several functions to conform with the Elisp
|
||||||
Coding Conventions.
|
Coding Conventions.
|
||||||
| Old Name | New Name |
|
| Old Name | New Name |
|
||||||
|------------------------------------------------------+------------------------------------------------------|
|
|----------------------------------------------------+----------------------------------------------------|
|
||||||
| ~eshell-info-banner--ge-mounted-partitions/duf~ | ~eshell-info-banner--ge-mounted-partitions-duf~ |
|
| ~eshell-info-banner--ge-mounted-partitions/duf~ | ~eshell-info-banner--ge-mounted-partitions-duf~ |
|
||||||
| ~eshell-info-banner--get-mounted-partitions/df~ | ~eshell-info-banner--get-mounted-partitions-df~ |
|
| ~eshell-info-banner--get-mounted-partitions/df~ | ~eshell-info-banner--get-mounted-partitions-df~ |
|
||||||
| ~eshell-info-banner--get-mounted-partitions/windows~ | ~eshell-info-banner--get-mounted-partitions-windows~ |
|
| ~eshell-info-banner--get-mounted-partitions/windows~ | ~eshell-info-banner--get-mounted-partitions-windows~ |
|
||||||
@@ -87,6 +87,9 @@ There is probably a similar way to install it with pure ~straight.el~ or
|
|||||||
~quelpa~, but I’m not knowledgable enough for that, feel free to create
|
~quelpa~, but I’m not knowledgable enough for that, feel free to create
|
||||||
a PR to add some more installation instructions!
|
a PR to add some more installation instructions!
|
||||||
|
|
||||||
|
There is currently no plans of making this package available on MELPA
|
||||||
|
or non-gnu elpa.
|
||||||
|
|
||||||
* Customizing
|
* Customizing
|
||||||
A couple of variables can be edited by the user in order to configure
|
A couple of variables can be edited by the user in order to configure
|
||||||
~eshell-info-banner.el~:
|
~eshell-info-banner.el~:
|
||||||
@@ -177,4 +180,4 @@ See [[file:CONTRIBUTING.org]].
|
|||||||
|
|
||||||
* License
|
* License
|
||||||
~eshell-info-banner.el~ is available under the GNU GPL-3.0 license. You
|
~eshell-info-banner.el~ is available under the GNU GPL-3.0 license. You
|
||||||
can find the full text in the [[file:LICENSE][LICENSE]] file.
|
can find the full text in [[file:LICENSE.md][LICENSE.md]].
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
;; Author: Lucien Cartier-Tilet <lucien@phundrak.com>
|
;; Author: Lucien Cartier-Tilet <lucien@phundrak.com>
|
||||||
;; Maintainer: Lucien Cartier-Tilet <lucien@phundrak.com>
|
;; Maintainer: Lucien Cartier-Tilet <lucien@phundrak.com>
|
||||||
;; Version: 0.7.4
|
;; Version: 0.7.2
|
||||||
;; Package-Requires: ((emacs "25.1") (f "0.20") (s "1"))
|
;; Package-Requires: ((emacs "25.1") (f "0.20") (s "1"))
|
||||||
;; Homepage: https://labs.phundrak.com/phundrak/eshell-info-banner.el
|
;; Homepage: https://labs.phundrak.com/phundrak/eshell-info-banner.el
|
||||||
|
|
||||||
@@ -82,9 +82,7 @@
|
|||||||
("11.1" . "macOS Big Sur")
|
("11.1" . "macOS Big Sur")
|
||||||
("11.2" . "macOS Big Sur")
|
("11.2" . "macOS Big Sur")
|
||||||
("11.3" . "macOS Big Sur")
|
("11.3" . "macOS Big Sur")
|
||||||
("11.4" . "macOS Big Sur")
|
("11.4" . "macOS Big Sur"))
|
||||||
("11.5" . "macOS Big Sur")
|
|
||||||
("11.6" . "macOS Big Sur"))
|
|
||||||
"Versions of OSX and macOS and their name."))
|
"Versions of OSX and macOS and their name."))
|
||||||
|
|
||||||
|
|
||||||
@@ -303,18 +301,17 @@ Common function between
|
|||||||
otherwise differ solely on the position of the mount point in the
|
otherwise differ solely on the position of the mount point in the
|
||||||
partition list. Its position is given by the argument
|
partition list. Its position is given by the argument
|
||||||
MOUNT-POSITION."
|
MOUNT-POSITION."
|
||||||
(let ((partitions (cdr (split-string (eshell-info-banner--shell-command-to-string "df -lH")
|
(let ((partitions (split-string (eshell-info-banner--shell-command-to-string "df -lH")
|
||||||
(regexp-quote "\n")
|
(regexp-quote "\n")
|
||||||
t))))
|
t)))
|
||||||
(cl-remove-if #'null
|
(seq-filter (lambda (partition)
|
||||||
(mapcar (lambda (partition)
|
|
||||||
(let* ((partition (split-string partition " " t))
|
(let* ((partition (split-string partition " " t))
|
||||||
(filesystem (nth 0 partition))
|
(filesystem (nth 0 partition))
|
||||||
(size (nth 1 partition))
|
(size (nth 1 partition))
|
||||||
(used (nth 2 partition))
|
(used (nth 2 partition))
|
||||||
(percent (nth 4 partition))
|
(percent (nth 4 partition))
|
||||||
(mount (nth mount-position partition)))
|
(mount (nth mount-position partition)))
|
||||||
(when (seq-some (lambda (prefix)
|
(unless (seq-some (lambda (prefix)
|
||||||
(string-prefix-p prefix filesystem t))
|
(string-prefix-p prefix filesystem t))
|
||||||
eshell-info-banner-partition-prefixes)
|
eshell-info-banner-partition-prefixes)
|
||||||
(make-eshell-info-banner--mounted-partitions
|
(make-eshell-info-banner--mounted-partitions
|
||||||
@@ -325,7 +322,7 @@ MOUNT-POSITION."
|
|||||||
:used used
|
:used used
|
||||||
:percent (string-to-number
|
:percent (string-to-number
|
||||||
(string-trim-left percent (regexp-quote "%")))))))
|
(string-trim-left percent (regexp-quote "%")))))))
|
||||||
partitions))))
|
partitions)))
|
||||||
|
|
||||||
(defun eshell-info-banner--get-mounted-partitions-gnu ()
|
(defun eshell-info-banner--get-mounted-partitions-gnu ()
|
||||||
"Detect mounted partitions on a Linux system.
|
"Detect mounted partitions on a Linux system.
|
||||||
|
|||||||
Reference in New Issue
Block a user