[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/disk-usage ea2bcd2 23/26: Set du-command dynamically fo
From: |
Pierre Neidhardt |
Subject: |
[elpa] externals/disk-usage ea2bcd2 23/26: Set du-command dynamically for BSD/macOS and make command settings customizable |
Date: |
Tue, 26 Feb 2019 03:06:40 -0500 (EST) |
branch: externals/disk-usage
commit ea2bcd27fd3f4e9eef7028e0ddb6093dde370903
Author: Pierre Neidhardt <address@hidden>
Commit: Pierre Neidhardt <address@hidden>
Set du-command dynamically for BSD/macOS and make command settings
customizable
---
disk-usage.el | 19 +++++++++++++++----
readme.org | 2 ++
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/disk-usage.el b/disk-usage.el
index 63b7fd9..1888a67 100644
--- a/disk-usage.el
+++ b/disk-usage.el
@@ -26,6 +26,9 @@
;;; Commentary:
;;
+;; Warning: BSD and macOS users need `gdu`, the "GNU du" from the "GNU
+;; coreutils".
+;;
;; Disk Usage is a file system analyzer: it offers a tabulated view of file
;; listings sorted by size. Directory sizes are computed recursively. The
results
;; are cached for speed.
@@ -35,7 +38,7 @@
;; `disk-usage-dired-at-point' to open a `dired' buffer for the current
;; directory.
;;
-;; Instead of displaying only the current folder, ~disk-usage~ can also display
+;; Instead of displaying only the current folder, `disk-usage' can also display
;; files in all subfolders recursively with `disk-usage-toggle-recursive'.
;;
;; Marked files can be trashed with `disk-usage-delete-marked-files'. When
@@ -75,9 +78,17 @@
"Whether to kill the current `disk-usage' buffer before moving directory."
:type 'boolean)
-(defvar disk-usage--du-command "du")
-(defvar disk-usage--du-args "-sb")
-(defvar disk-usage--find-command "find")
+(defcustom disk-usage--du-command (if (member system-type '(gnu gnu/linux
gnu/kfreebsd))
+ "du"
+ "gdu")
+ "Non-GNU users need GNU's `du' for the `-b' flag. See
`disk-usage--du-args'."
+ :type 'string)
+(defcustom disk-usage--du-args "-sb"
+ "Non-GNU users need GNU's `du' for the `-b' flag. See
`disk-usage--du-command'."
+ :type 'string)
+(defcustom disk-usage--find-command "find"
+ "The `find' executable. This is required for recursive listings."
+ :type 'string)
(defcustom disk-usage--directory-size-function
(if (executable-find disk-usage--du-command)
diff --git a/readme.org b/readme.org
index 596cb11..e1ad843 100644
--- a/readme.org
+++ b/readme.org
@@ -22,6 +22,8 @@ Load the package with
: (require 'disk-usage)
+Warning: BSD and macOS users need `gdu`, the "GNU du" from the "GNU coreutils".
+
* Features
Run ~disk-usage~ or ~disk-usage-here~ to display a listing. See
~describe-mode~
- [elpa] externals/disk-usage updated (0bbb9a6 -> a53be8d), Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage 349719b 11/26: Display symlink targets, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage c7f4597 16/26: Customize default filters, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage ea2bcd2 23/26: Set du-command dynamically for BSD/macOS and make command settings customizable,
Pierre Neidhardt <=
- [elpa] externals/disk-usage 936b73d 06/26: Actually use disk-usage--find-command, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage 20ed51e 13/26: Fix mark not being set, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage 284c142 24/26: Inherit from error/warning faces instead of defining foreground colors, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage 7fd6e43 19/26: Add filters to recursive listings, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage cec7fc6 02/26: Require Emacs 26 for file-attribute-* functions, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage 2874158 03/26: Add TODOs about file-notify, date filtering, formatting and process-file, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage c44cc97 01/26: Set default for directory-size-function dynamically, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage 6846590 15/26: Add 1-hour filter, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage 1d85ea5 10/26: Fix missing total-size in header, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage 0feb208 18/26: Message instead of warning when no filters, Pierre Neidhardt, 2019/02/26