6 Commits
0.7.2 ... 0.7.4

Author SHA1 Message Date
9b75d19451 Add new macOS Big Sur versions 2021-11-19 19:06:43 +01:00
81181090df Bump version 2021-11-19 18:55:26 +01:00
0bd70d0d0f Fix df-related code 2021-11-19 18:38:24 +01:00
312f1e3da3 Update link in REAMDE 2021-11-15 10:14:29 +01:00
a43818569d Fix value type issue in `eshell-info-banner--get-memory-gnu' 2021-11-15 10:14:29 +01:00
517b9d705c Update README, package is now in melpa
Update recipes for installing package

Add MELPA badge
2021-11-15 10:14:29 +01:00
2 changed files with 30 additions and 30 deletions

View File

@@ -33,8 +33,8 @@ macOS. PR are welcome if you want to fix that!
** ~0.7.0~ ** ~0.7.0~
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,9 +87,6 @@ There is probably a similar way to install it with pure ~straight.el~ or
~quelpa~, but Im not knowledgable enough for that, feel free to create ~quelpa~, but Im 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~:
@@ -180,4 +177,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 [[file:LICENSE.md][LICENSE.md]]. can find the full text in the [[file:LICENSE][LICENSE]] file.

View File

@@ -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.2 ;; Version: 0.7.4
;; 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,7 +82,9 @@
("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."))
@@ -301,28 +303,29 @@ 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 (split-string (eshell-info-banner--shell-command-to-string "df -lH") (let ((partitions (cdr (split-string (eshell-info-banner--shell-command-to-string "df -lH")
(regexp-quote "\n") (regexp-quote "\n")
t))) t))))
(seq-filter (lambda (partition) (cl-remove-if #'null
(let* ((partition (split-string partition " " t)) (mapcar (lambda (partition)
(filesystem (nth 0 partition)) (let* ((partition (split-string partition " " t))
(size (nth 1 partition)) (filesystem (nth 0 partition))
(used (nth 2 partition)) (size (nth 1 partition))
(percent (nth 4 partition)) (used (nth 2 partition))
(mount (nth mount-position partition))) (percent (nth 4 partition))
(unless (seq-some (lambda (prefix) (mount (nth mount-position partition)))
(string-prefix-p prefix filesystem t)) (when (seq-some (lambda (prefix)
eshell-info-banner-partition-prefixes) (string-prefix-p prefix filesystem t))
(make-eshell-info-banner--mounted-partitions eshell-info-banner-partition-prefixes)
:path (if (> (length mount) eshell-info-banner-shorten-path-from) (make-eshell-info-banner--mounted-partitions
(eshell-info-banner--abbr-path mount t) :path (if (> (length mount) eshell-info-banner-shorten-path-from)
mount) (eshell-info-banner--abbr-path mount t)
:size size mount)
:used used :size size
:percent (string-to-number :used used
(string-trim-left percent (regexp-quote "%"))))))) :percent (string-to-number
partitions))) (string-trim-left percent (regexp-quote "%")))))))
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.