88
99### Installation
1010
11- ### Binary Release
11+ ### Binary Release
1212
1313#### MacOS
1414
@@ -18,12 +18,14 @@ curl -LSfs https://raw.githubusercontent.com/Byron/dua-cli/master/ci/install.sh
1818```
1919
2020#### MacOS via [ MacPorts] ( https://www.macports.org ) :
21+
2122``` sh
2223sudo port selfupdate
2324sudo port install dua-cli
2425```
2526
2627#### MacOS via [ Homebrew] ( https://brew.sh )
28+
2729``` sh
2830brew update
2931brew install dua-cli
@@ -39,11 +41,13 @@ curl -LSfs https://raw.githubusercontent.com/Byron/dua-cli/master/ci/install.sh
3941```
4042
4143#### Windows via [ Scoop] ( https://scoop.sh/ )
44+
4245``` sh
4346scoop install dua
4447```
4548
4649#### Windows via [ WinGet] ( https://learn.microsoft.com/en-us/windows/package-manager/winget/ )
50+
4751``` sh
4852winget install Byron.dua-cli
4953```
@@ -55,9 +59,11 @@ See the [releases section][releases] for manual installation of a binary, pre-bu
5559[ releases ] : https://github.com/Byron/dua-cli/releases
5660
5761#### Cargo
62+
5863Via ` cargo ` , which can be obtained using [ rustup] [ rustup ]
5964
6065For _ Unix_ …
66+
6167```
6268cargo install dua-cli
6369
@@ -69,32 +75,37 @@ cargo install dua-cli --no-default-features --features tui-crossplatform
6975```
7076
7177For _ Windows_ , nightly features are currently required.
78+
7279```
7380cargo +nightly install dua-cli
7481```
7582
7683#### VoidLinux
84+
7785Via ` xbps ` on your VoidLinux system.
7886
7987```
8088xbps-install dua-cli
8189```
8290
8391#### Fedora
92+
8493Via ` dnf ` on your Fedora system.
8594
8695```
8796sudo dnf install dua-cli
8897```
8998
9099#### Arch Linux
100+
91101Via ` pacman ` on your ArchLinux system.
92102
93103```
94104sudo pacman -S dua-cli
95105```
96106
97107#### NixOS
108+
98109https://search.nixos.org/packages?query=dua
99110
100111Nix-shell (temporary)
@@ -112,6 +123,7 @@ NixOS configuration
112123```
113124
114125#### NetBSD
126+
115127Via ` pkgin ` on your NetBSD system.
116128
117129```
@@ -137,9 +149,11 @@ cargo +nightly install dua-cli
137149#### x-cmd
138150
139151[ x-cmd] ( https://www.x-cmd.com/ ) is a ** toolbox for Posix Shell** , offering a lightweight package manager built using shell and awk.
152+
140153``` sh
141154x env use dua
142155```
156+
143157- Additionally, the [ ` x dua ... ` ] ( https://www.x-cmd.com/pkg/dua#dua ) command is available, which automatically installs ` dua ` without affecting the environment, such as not modifying the ` PATH ` variable.
144158
145159### Usage
@@ -167,6 +181,26 @@ dua i
167181dua interactive
168182```
169183
184+ ### Configuration
185+
186+ ` dua ` can read an optional configuration file from your OS-specific config directory:
187+
188+ 1 . Linux/Unix: ` $XDG_CONFIG_HOME/dua-cli/config.toml ` (or the platform default config dir)
189+ 2 . macOS: ` ~/Library/Application Support/dua-cli/config.toml `
190+ 3 . Windows: ` %APPDATA%\dua-cli\config.toml `
191+
192+ If the file is missing, defaults are used.
193+
194+ Currently supported options:
195+
196+ ``` toml
197+ [keys ]
198+ # If true, pressing <Esc> in the main pane navigates to the parent directory.
199+ # If true (default), pressing <Esc> in the main pane ascends to the parent directory.
200+ # If false, <Esc> follows the default quit behavior.
201+ esc_navigates_back = true
202+ ```
203+
170204### Development
171205
172206Please note that all the following assumes a unix system. On Windows, the linux subsystem should do the job.
@@ -197,39 +231,39 @@ Thanks to [jwalk][jwalk], all there was left to do is to write a command-line in
197231
198232### Limitations
199233
200- * Does not show symbolic links at all if no path is provided when invoking ` dua `
201- * in an effort to skip symbolic links, for now there are pruned and are not used as a root. Symbolic links will be shown if they
234+ - Does not show symbolic links at all if no path is provided when invoking ` dua `
235+ - in an effort to skip symbolic links, for now there are pruned and are not used as a root. Symbolic links will be shown if they
202236 are not a traversal root, but will not be followed.
203- * Interactive mode only looks good in dark terminals (see [ this issue] ( https://github.com/Byron/dua-cli/issues/13 ) )
204- * _ easy fix_ : file names in main window are not truncated if too large. They are cut off on the right.
205- * There are plenty of examples in ` tests/fixtures ` which don't render correctly in interactive mode.
237+ - Interactive mode only looks good in dark terminals (see [ this issue] ( https://github.com/Byron/dua-cli/issues/13 ) )
238+ - _ easy fix_ : file names in main window are not truncated if too large. They are cut off on the right.
239+ - There are plenty of examples in ` tests/fixtures ` which don't render correctly in interactive mode.
206240 This can be due to graphemes not interpreted correctly. With Chinese characters for instance,
207241 column sizes are not correctly computed, leading to certain columns not being shown.
208242 In other cases, the terminal gets things wrong - I use alacritty, and with certain characters it
209243 performs worse than, say iTerm3.
210244 See https://github.com/minimaxir/big-list-of-naughty-strings/blob/master/blns.txt for the source.
211- * In interactive mode, you will need about 60MB of memory for 1 million entries in the graph.
212- * In interactive mode, the maximum amount of files is limited to 2^32 - 1 (` u32::max_value() - 1 ` ) entries.
213- * One node is used as to 'virtual' root
214- * The actual amount of nodes stored might be lower, as there might be more edges than nodes, which are also limited by a ` u32 ` (I guess)
215- * The limitation is imposed by the underlying [ ` petgraph ` ] [ petgraph ] crate, which declares it as ` unsafe ` to use u64 for instance.
216- * It's possibly * UB * when that limit is reached, however, it was never observed either.
217-
218- ### Similar Programs
219-
220- * ** CLI:**
221- * ` du `
222- * [ ` dust ` ] ( https://github.com/bootandy/dust )
223- * [ ` dutree ` ] ( https://github.com/nachoparker/dutree )
224- * [ ` pdu ` ] ( https://github.com/KSXGitHub/parallel-disk-usage )
225- * ** TUI:**
226- * [ ` ncdu ` ] ( https://dev.yorhel.nl/ncdu )
227- * [ ` gdu ` ] ( https://github.com/dundee/gdu )
228- * [ ` godu ` ] ( https://github.com/viktomas/godu )
229- * ** GUI:**
230- * [ GNOME's Disk Usage Analyzer, a.k.a. ` baobab ` ] ( https://wiki.gnome.org/action/show/Apps/DiskUsageAnalyzer )
231- * [ Filelight] ( https://apps.kde.org/filelight/ )
232-
245+ - In interactive mode, you will need about 60MB of memory for 1 million entries in the graph.
246+ - In interactive mode, the maximum amount of files is limited to 2^32 - 1 (` u32::max_value() - 1 ` ) entries.
247+ - One node is used as to 'virtual' root
248+ - The actual amount of nodes stored might be lower, as there might be more edges than nodes, which are also limited by a ` u32 ` (I guess)
249+ - The limitation is imposed by the underlying [ ` petgraph ` ] [ petgraph ] crate, which declares it as ` unsafe ` to use u64 for instance.
250+ - It's possibly _ UB _ when that limit is reached, however, it was never observed either.
251+
252+ ### Similar Programs
253+
254+ - ** CLI:**
255+ - ` du `
256+ - [ ` dust ` ] ( https://github.com/bootandy/dust )
257+ - [ ` dutree ` ] ( https://github.com/nachoparker/dutree )
258+ - [ ` pdu ` ] ( https://github.com/KSXGitHub/parallel-disk-usage )
259+ - ** TUI:**
260+ - [ ` ncdu ` ] ( https://dev.yorhel.nl/ncdu )
261+ - [ ` gdu ` ] ( https://github.com/dundee/gdu )
262+ - [ ` godu ` ] ( https://github.com/viktomas/godu )
263+ - ** GUI:**
264+ - [ GNOME's Disk Usage Analyzer, a.k.a. ` baobab ` ] ( https://wiki.gnome.org/action/show/Apps/DiskUsageAnalyzer )
265+ - [ Filelight] ( https://apps.kde.org/filelight/ )
266+
233267[ petgraph ] : https://crates.io/crates/petgraph
234268[ rustup ] : https://rustup.rs/
235269[ jwalk ] : https://crates.io/crates/jwalk
0 commit comments