Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
221 commits
Select commit Hold shift + click to select a range
de0dca8
feat!: hardlink deduplications (wip)
KSXGitHub Jul 12, 2025
5c8b069
test: multiple hardlinks to a single file
KSXGitHub Jul 12, 2025
12fa7c7
fix: algorithm
KSXGitHub Jul 12, 2025
fe72ec6
test: children
KSXGitHub Jul 12, 2025
5b1cad7
refactor: allow customization
KSXGitHub Jul 12, 2025
213382d
feat(api): re-export `dashmap`
KSXGitHub Jul 12, 2025
4bfa4ab
feat: report deduplication results
KSXGitHub Jul 12, 2025
f0f5747
refactor: use `0.into()` instead
KSXGitHub Jul 12, 2025
b3b482c
refactor: just use `default`
KSXGitHub Jul 12, 2025
1bbb6ef
feat(api): ability to cause errors
KSXGitHub Jul 12, 2025
c29fcd5
feat!: report hardlinks to progress
KSXGitHub Jul 13, 2025
b58bfd6
feat(api): stop exposing `dashmap`
KSXGitHub Jul 13, 2025
6cd0287
feat(api): obscure container type
KSXGitHub Jul 13, 2025
2b21f71
docs: fix
KSXGitHub Jul 13, 2025
595e706
feat(api): newtype for inode numbers
KSXGitHub Jul 13, 2025
22846c3
feat(api): make `Event` `non_exhaustive`
KSXGitHub Jul 13, 2025
0d928a2
feat(api): rename a struct
KSXGitHub Jul 13, 2025
f83f2ae
feat: show shared links before errors
KSXGitHub Jul 13, 2025
6ec0927
feat(api): `ProgressReport::shared` should be `Size`
KSXGitHub Jul 13, 2025
28b5cff
chore(git): merge from master
KSXGitHub Jul 13, 2025
85de54d
perf: reduce string resizing
KSXGitHub Jul 13, 2025
dfcc95f
chore(git): merge from master
KSXGitHub Jul 13, 2025
5f94924
feat(api): rename some structs
KSXGitHub Jul 13, 2025
cfb11d1
feat(api): move `HardlinkList` to `hardlink`
KSXGitHub Jul 13, 2025
475c690
docs: fix
KSXGitHub Jul 13, 2025
9d4a952
feat(api): reflection types for hardlink types
KSXGitHub Jul 13, 2025
807321e
fix(windows): dependencies
KSXGitHub Jul 13, 2025
3baa44c
feat(json)!: add optional `shared-inodes`
KSXGitHub Jul 13, 2025
72f5917
feat(api): add some aliases
KSXGitHub Jul 13, 2025
0c8c1bb
chore(git): merge from master
KSXGitHub Jul 13, 2025
4efa9b9
docs: correction
KSXGitHub Jul 13, 2025
97826ea
docs: correction
KSXGitHub Jul 13, 2025
ed01970
chore(git): merge from master
KSXGitHub Jul 13, 2025
ec69829
feat(api): `into_reflection`
KSXGitHub Jul 13, 2025
b988099
feat(api): `HardlinkList::{len,is_empty}`
KSXGitHub Jul 13, 2025
23e925e
feat(json): output the hardlink record
KSXGitHub Jul 13, 2025
bbba73c
chore(git): revert a wrong change
KSXGitHub Jul 13, 2025
840d182
fix(json): move `"shared-inodes"` out of `"tree"`
KSXGitHub Jul 13, 2025
85960f8
feat(api)!: rename `UnitAndTree` to `JsonDataBody`
KSXGitHub Jul 13, 2025
27fc5b9
feat(windows): error on unsupported feature
KSXGitHub Jul 13, 2025
f435686
fix(json): `--json-input` with `--shared-inodes`
KSXGitHub Jul 13, 2025
c8bc963
feat(json): rename `"shared-inodes"` to `"shared"`
KSXGitHub Jul 13, 2025
7f89b74
refactor: this looks better
KSXGitHub Jul 13, 2025
f055a3a
feat(json): always sort `shared` by `ino`
KSXGitHub Jul 13, 2025
626d15d
chore(git): merge from master
KSXGitHub Jul 13, 2025
d7cc3d7
chore(git): merge from master
KSXGitHub Jul 13, 2025
852ad79
fix: git merge artifact
KSXGitHub Jul 13, 2025
e7416d5
fix: `TEXT_MAX_LEN`
KSXGitHub Jul 13, 2025
f679ea6
feat(api)!: remove `hook`
KSXGitHub Jul 13, 2025
91a802e
feat(api): add some aliases
KSXGitHub Jul 13, 2025
c2acc9f
feat(api): re-export `RecordHardlinksArgument`
KSXGitHub Jul 13, 2025
1c201e3
feat(api): create some aliases
KSXGitHub Jul 13, 2025
2369f76
feat(api): expose `aware` and `ignorant`
KSXGitHub Jul 13, 2025
fd98a35
feat(api): simplify, eliminate `.clone()`
KSXGitHub Jul 13, 2025
12343de
chore(git): merge from master
KSXGitHub Jul 13, 2025
eb201c9
refactor: shorten, consistency
KSXGitHub Jul 13, 2025
e795346
refactor: rename a trait to match its sole method
KSXGitHub Jul 13, 2025
16c3fe4
refactor: shorten a name
KSXGitHub Jul 13, 2025
0f6f7a8
docs: `HardlinkAware::new`
KSXGitHub Jul 14, 2025
0ea937b
refactor: use `SmartDefault`
KSXGitHub Jul 14, 2025
562f844
feat(api): `DeduplicateSharedSize`
KSXGitHub Jul 14, 2025
e678fff
refactor: move POSIX-exclusive code to its own module
KSXGitHub Jul 14, 2025
ffb7bdc
feat(api): `Reflection::{new,len,is_empty}`
KSXGitHub Jul 14, 2025
1215edf
feat(api): `Reflection::iter`
KSXGitHub Jul 14, 2025
a91e2f8
feat(api): summarize `HardlinkList`
KSXGitHub Jul 14, 2025
9c96eaa
fix: compilation conditionals
KSXGitHub Jul 14, 2025
bfbf2eb
feat(api): `Reflection::{len,is_empty}`
KSXGitHub Jul 14, 2025
f8faea2
feat(json): `.shared.{details,summary}`
KSXGitHub Jul 14, 2025
052952f
feat(api): `Default` for `JsonShared`
KSXGitHub Jul 14, 2025
b8651d9
fix: report hardlinks
KSXGitHub Jul 14, 2025
9c40704
feat(api): shorten a method name
KSXGitHub Jul 14, 2025
f70ca66
test: fix
KSXGitHub Jul 14, 2025
af0dccb
feat(json): print hardlinks summary
KSXGitHub Jul 14, 2025
2fe04a0
fix(json): missing `shared`
KSXGitHub Jul 14, 2025
369eb57
fix: clippy
KSXGitHub Jul 14, 2025
10ca624
chore(git): merge from master
KSXGitHub Jul 14, 2025
5652da0
feat(json): omit `.shared.{details,summary}`
KSXGitHub Jul 14, 2025
a98b9ed
feat(cli): forbid `--json-input` + `--deduplicate-hardlinks`
KSXGitHub Jul 14, 2025
725d477
feat(cli): define some aliases
KSXGitHub Jul 14, 2025
a266cce
chore: generate completions
KSXGitHub Jul 14, 2025
0b4791f
chore(git): merge from master
KSXGitHub Jul 14, 2025
ad1cee7
refactor: prefer arrays
KSXGitHub Jul 14, 2025
b784f25
docs(cli): make some aliases visible
KSXGitHub Jul 14, 2025
71b3053
chore(git): merge from master
KSXGitHub Jul 14, 2025
82bdd57
refactor: move iterators to its own module
KSXGitHub Jul 14, 2025
f516d15
refactor: move iterator to its own module
KSXGitHub Jul 14, 2025
e6b130c
feat(api)!: pass params into `Sub::json_output`
KSXGitHub Jul 14, 2025
64059c6
feat(api): convert `Infallible` to `RuntimeError`
KSXGitHub Jul 16, 2025
603f995
docs: add some text
KSXGitHub Jul 16, 2025
d3656d5
feat(api): make `RecordHardlinks` fallible
KSXGitHub Jul 16, 2025
8f79037
feat(api): move instead of mutate
KSXGitHub Jul 16, 2025
e0fae50
feat: output json despite deduplication failures
KSXGitHub Jul 16, 2025
47d5cd5
refactor: replace qualified with use
KSXGitHub Jul 16, 2025
32fe9b6
feat: report the number of unrecorded links (wip)
KSXGitHub Jul 16, 2025
160e131
feat: report the number of unrecorded links
KSXGitHub Jul 16, 2025
8135849
fix: message
KSXGitHub Jul 16, 2025
124316d
fix: grammar
KSXGitHub Jul 16, 2025
7ef427d
feat: remove extra trailing newline
KSXGitHub Jul 16, 2025
e1c81dc
feat(api): stop relying on `Into`
KSXGitHub Jul 16, 2025
9740739
feat(api): remove unneeded impls
KSXGitHub Jul 16, 2025
951cc57
feat(api): better names
KSXGitHub Jul 16, 2025
03b783d
docs: be more specific
KSXGitHub Jul 16, 2025
12d658a
feat(api): revert back to mutations
KSXGitHub Jul 16, 2025
f522308
docs: real solutions
KSXGitHub Jul 16, 2025
fdea369
docs: I have decided that I don't care
KSXGitHub Jul 16, 2025
ad7c321
chore(git): merge from master
KSXGitHub Jul 17, 2025
fcc2396
fix: windows
KSXGitHub Jul 17, 2025
b1acd50
test: fix windows
KSXGitHub Jul 17, 2025
327ffeb
fix: windows
KSXGitHub Jul 17, 2025
2830d9e
fix: windows
KSXGitHub Jul 17, 2025
eb8bbbc
test: fix windows
KSXGitHub Jul 17, 2025
74feb68
test: fix windows
KSXGitHub Jul 17, 2025
5d3ebe6
test: fix windows
KSXGitHub Jul 17, 2025
ca2daff
test: fix windows
KSXGitHub Jul 17, 2025
cbc0982
test: fix windows
KSXGitHub Jul 17, 2025
7a6ed88
chore(git): merge from master
KSXGitHub Jul 17, 2025
b319ab8
chore(git): merge from master
KSXGitHub Jul 17, 2025
2b4fd62
chore: remove a lint silencer
KSXGitHub Jul 17, 2025
384f882
docs: resolve a todo
KSXGitHub Jul 18, 2025
a679644
feat(api): summary on no hardlinks
KSXGitHub Jul 18, 2025
581f154
docs: resolve a todo
KSXGitHub Jul 18, 2025
755c9ee
feat(api): remove eq traits from `LinkPathList`
KSXGitHub Jul 19, 2025
5c6d827
docs: more details
KSXGitHub Jul 19, 2025
67e707e
docs: correction
KSXGitHub Jul 19, 2025
9e7ce54
test: reflections' equality
KSXGitHub Jul 19, 2025
10fab14
feat: assert links equal
KSXGitHub Jul 19, 2025
efa2f91
test: change detection
KSXGitHub Jul 19, 2025
f6dc400
fix: windows
KSXGitHub Jul 19, 2025
125b1d4
chore(git): merge from master
KSXGitHub Jul 19, 2025
ae7644c
ci(benchmark): add `deduplicate-hardlinks`
KSXGitHub Jul 19, 2025
fd71760
docs(cli): add examples
KSXGitHub Jul 19, 2025
607f545
docs(cli): consistent wording
KSXGitHub Jul 19, 2025
b8fe566
chore(git): merge from master
KSXGitHub Jul 19, 2025
9819f62
docs(cli): more accurate description
KSXGitHub Jul 19, 2025
d711c47
chore(git): merge from master
KSXGitHub Jul 19, 2025
b94fb80
chore: update completions
KSXGitHub Jul 19, 2025
3752a42
docs(readme): update regarding hardlinks
KSXGitHub Jul 19, 2025
b77203d
fix: windows
KSXGitHub Jul 19, 2025
2d0e08e
refactor: longer dot chain
KSXGitHub Jul 19, 2025
470a325
test: prepare some functions
KSXGitHub Jul 20, 2025
c017589
refactor: word wrap consistently
KSXGitHub Jul 20, 2025
153b922
test: less confusing names
KSXGitHub Jul 20, 2025
43da969
feat(api): add missing `Mul<usize>`
KSXGitHub Jul 20, 2025
32df539
fix(test): create the files
KSXGitHub Jul 20, 2025
0f9ea89
docs: fix grammar
KSXGitHub Jul 20, 2025
1402afb
test: complex tree
KSXGitHub Jul 20, 2025
370df47
chore(git): merge from master
KSXGitHub Jul 20, 2025
c2af820
style: add an empty line
KSXGitHub Jul 20, 2025
326540e
refactor: rearrange
KSXGitHub Jul 20, 2025
7862158
test: hardlinks summary
KSXGitHub Jul 20, 2025
debc50c
chore(git): merge from master
KSXGitHub Jul 20, 2025
b1501c3
refactor: use `.into_sorted_by`
KSXGitHub Jul 20, 2025
9f2319b
test: hardlinks details
KSXGitHub Jul 20, 2025
d6d0fa1
docs: plan
KSXGitHub Jul 20, 2025
6f2cf07
refactor: rename a function
KSXGitHub Jul 20, 2025
6d41336
refactor: add `.as_ref`
KSXGitHub Jul 20, 2025
8b5c04f
test: add some (wip)
KSXGitHub Jul 20, 2025
f72fb56
test: sorted
KSXGitHub Jul 20, 2025
cec0852
test: unique inodes
KSXGitHub Jul 20, 2025
577a17e
test: combine
KSXGitHub Jul 20, 2025
65e7ddb
test: correct setup function
KSXGitHub Jul 20, 2025
03bbcf7
test: more even number
KSXGitHub Jul 20, 2025
4462f52
test: summary
KSXGitHub Jul 20, 2025
80c3c52
test: use `assert_eq`
KSXGitHub Jul 20, 2025
aa4d827
test: without deduplication
KSXGitHub Jul 20, 2025
52a1e9a
test: consistent convention
KSXGitHub Jul 20, 2025
cd31cf0
test: create fewer files
KSXGitHub Jul 20, 2025
2361801
chore(git): merge from master
KSXGitHub Jul 20, 2025
e920c22
refactor: better formula
KSXGitHub Jul 20, 2025
3952286
docs: remove irrelevant comment
KSXGitHub Jul 20, 2025
c9749e7
test: `into_sorted_by_key`
KSXGitHub Jul 21, 2025
5658d94
test: some hardlinks with deduplication
KSXGitHub Jul 21, 2025
292bafc
chore(git): merge from master
KSXGitHub Jul 21, 2025
939cad3
refactor: remove unnecessary `vec!`
KSXGitHub Jul 21, 2025
03adc0f
test: hardlinks summary text
KSXGitHub Jul 21, 2025
7a259b0
refactor: shorten the code
KSXGitHub Jul 21, 2025
fe61d11
test: some hardlinks without deduplication
KSXGitHub Jul 21, 2025
aeb2da1
refactor: rearrange
KSXGitHub Jul 21, 2025
9873adb
refactor: split a test file
KSXGitHub Jul 21, 2025
c66f597
refactor: rename a test file
KSXGitHub Jul 21, 2025
2edf809
refactor: remove repeating suffices from test names
KSXGitHub Jul 21, 2025
e3ff03e
feat(api): immutable setter methods
KSXGitHub Jul 21, 2025
a131d53
chore(deps): add `derive_setters`
KSXGitHub Jul 21, 2025
9c9387e
chore(git): merge from master
KSXGitHub Jul 21, 2025
74412cd
feat(api): immutable setters for `Summary`
KSXGitHub Jul 21, 2025
5d5a0c6
chore(git): merge from master
KSXGitHub Jul 21, 2025
becf1ec
test: exclusive hardlinks only
KSXGitHub Jul 21, 2025
38f6127
test: mixing exclusive-only and external-only
KSXGitHub Jul 22, 2025
f3094ea
test: add a missing assertion
KSXGitHub Jul 22, 2025
7cd78a4
test: external hardlinks only
KSXGitHub Jul 22, 2025
11c0d04
refactor: consistent naming
KSXGitHub Jul 22, 2025
3dcc69c
test: simple tree with some hardlinks
KSXGitHub Jul 22, 2025
f224bfd
test: visualization
KSXGitHub Jul 22, 2025
f3a390d
style: remove some empty lines
KSXGitHub Jul 22, 2025
3d9adab
refactor: remove unnecessary cast
KSXGitHub Jul 22, 2025
a65af09
feat: multiple arguments hardlinks deduplication
KSXGitHub Jul 22, 2025
e0611e8
test: multiple arguments hardlinks deduplication
KSXGitHub Jul 23, 2025
5503aa2
refactor: rename a test file
KSXGitHub Jul 23, 2025
c1976aa
feat: deduplicate arguments
KSXGitHub Jul 24, 2025
749d7d6
test: `remove_items_from_vec_by_indices`
KSXGitHub Jul 24, 2025
6f6994b
docs: quirk
KSXGitHub Jul 24, 2025
792e127
test: posix only
KSXGitHub Jul 24, 2025
1bfafb7
refactor: use mockable trait
KSXGitHub Jul 24, 2025
3453eb1
test: add some tests
KSXGitHub Jul 25, 2025
7f356bb
test: correct `MockedApi::canonicalize`
KSXGitHub Jul 25, 2025
e3ef30a
feat: spare symlinks from deduplication
KSXGitHub Jul 25, 2025
4d1b9bc
test: forgot to normalize
KSXGitHub Jul 25, 2025
ea92f2e
test: fix `MockedApi::is_real_dir`
KSXGitHub Jul 25, 2025
3fba374
test: fix a typo
KSXGitHub Jul 25, 2025
6b8a696
test: clear assertion message
KSXGitHub Jul 25, 2025
e8cccc4
test: fix `resolve_symlink`
KSXGitHub Jul 25, 2025
bbac7ea
test: add some tests
KSXGitHub Jul 25, 2025
61926c4
style: missing trailing comma
KSXGitHub Jul 25, 2025
4f4cc68
refactor: move tests to their own files
KSXGitHub Jul 25, 2025
01e9fbc
chore(git): merge from master
KSXGitHub Jul 25, 2025
e1412a9
test: deduplicate arguments
KSXGitHub Jul 26, 2025
c94b7b3
chore: apply some suggestions
KSXGitHub Jul 26, 2025
c8f607e
style: apply copilot suggestion
KSXGitHub Jul 26, 2025
b96450d
docs(cli): improve flag description
KSXGitHub Jul 26, 2025
485a886
refactor: use better terms
KSXGitHub Jul 26, 2025
9af27b9
chore(git): merge from master
KSXGitHub Jul 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 85 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ cli = ["clap/derive", "clap_complete", "clap-utilities", "json"]
cli-completions = ["cli"]

[dependencies]
dashmap = "^6.1.0"
pipe-trait = "^0.4.0"
smart-default = "^0.7.1"
derive_more = { version = "^2.0.1", features = ["full"] }
Expand All @@ -72,5 +73,6 @@ sysinfo = "^0.35.2"
build-fs-tree = "^0.7.1"
command-extra = "^1.0.0"
maplit = "^1.0.2"
normalize-path = "^0.2.1"
pretty_assertions = "^1.4.1"
rand = "^0.9.1"
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,14 @@ The benchmark was generated by [a GitHub Workflow](https://github.com/KSXGitHub/
* Very fast.
* Relative comparison of separate files.
* Extensible via the library crate or JSON interface.
* Unbiased regarding hardlinks: All hardlinks are treated as equally real.
* Optional hardlink detection and deduplication (would make `pdu` proportionally slower).
* Optional progress report (would make `pdu` slightly slower).
* Customize tree depth.
* Customize chart size.

## Limitations

* Ignorant of hard links: All hard links are counted as real files.
* Do not follow symbolic links.
* Do not differentiate filesystem: Mounted folders are counted as normal folders.
* The runtime is optimized at the expense of binary size.
Expand Down
11 changes: 11 additions & 0 deletions ci/github-actions/benchmark/matrix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,17 @@ export const COMPETING_BENCHMARK_MATRIX: readonly CompetingBenchmarkCategory[] =
['du', '--count-links'],
],
},
{
id: 'deduplicate-hardlinks',
pduCliArgs: ['--deduplicate-hardlinks'],
competitors: [
['dust', '--no-progress'],
['dua'],
['ncdu', '-o', '/dev/stdout', '-0'],
['gdu', '--non-interactive', '--no-progress'],
['du'],
],
},
{
id: 'top-down',
pduCliArgs: ['--top-down'],
Expand Down
2 changes: 1 addition & 1 deletion exports/completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ _pdu() {

case "${cmd}" in
pdu)
opts="-h -V --json-input --json-output --bytes-format --top-down --align-right --quantity --depth --max-depth --width --total-width --column-width --min-ratio --no-sort --no-errors --silent-errors --progress --threads --help --version [FILES]..."
opts="-h -V --json-input --json-output --bytes-format --detect-links --dedupe-links --deduplicate-hardlinks --top-down --align-right --quantity --depth --max-depth --width --total-width --column-width --min-ratio --no-sort --no-errors --silent-errors --progress --threads --omit-json-shared-details --omit-json-shared-summary --help --version [FILES]..."
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
Expand Down
5 changes: 5 additions & 0 deletions exports/completion.elv
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,17 @@ set edit:completion:arg-completer[pdu] = {|@words|
cand --threads 'Set the maximum number of threads to spawn. Could be either "auto", "max", or a number'
cand --json-input 'Read JSON data from stdin'
cand --json-output 'Print JSON data instead of an ASCII chart'
cand --deduplicate-hardlinks 'Detect and subtract the sizes of hardlinks from their parent directory totals'
cand --detect-links 'Detect and subtract the sizes of hardlinks from their parent directory totals'
cand --dedupe-links 'Detect and subtract the sizes of hardlinks from their parent directory totals'
cand --top-down 'Print the tree top-down instead of bottom-up'
cand --align-right 'Set the root of the bars to the right'
cand --no-sort 'Do not sort the branches in the tree'
cand --silent-errors 'Prevent filesystem error messages from appearing in stderr'
cand --no-errors 'Prevent filesystem error messages from appearing in stderr'
cand --progress 'Report progress being made at the expense of performance'
cand --omit-json-shared-details 'Do not output `.shared.details` in the JSON output'
cand --omit-json-shared-summary 'Do not output `.shared.summary` in the JSON output'
cand -h 'Print help (see more with ''--help'')'
cand --help 'Print help (see more with ''--help'')'
cand -V 'Print version'
Expand Down
3 changes: 3 additions & 0 deletions exports/completion.fish
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ complete -c pdu -l min-ratio -d 'Minimal size proportion required to appear' -r
complete -c pdu -l threads -d 'Set the maximum number of threads to spawn. Could be either "auto", "max", or a number' -r
complete -c pdu -l json-input -d 'Read JSON data from stdin'
complete -c pdu -l json-output -d 'Print JSON data instead of an ASCII chart'
complete -c pdu -l deduplicate-hardlinks -l detect-links -l dedupe-links -d 'Detect and subtract the sizes of hardlinks from their parent directory totals'
complete -c pdu -l top-down -d 'Print the tree top-down instead of bottom-up'
complete -c pdu -l align-right -d 'Set the root of the bars to the right'
complete -c pdu -l no-sort -d 'Do not sort the branches in the tree'
complete -c pdu -l silent-errors -l no-errors -d 'Prevent filesystem error messages from appearing in stderr'
complete -c pdu -l progress -d 'Report progress being made at the expense of performance'
complete -c pdu -l omit-json-shared-details -d 'Do not output `.shared.details` in the JSON output'
complete -c pdu -l omit-json-shared-summary -d 'Do not output `.shared.summary` in the JSON output'
complete -c pdu -s h -l help -d 'Print help (see more with \'--help\')'
complete -c pdu -s V -l version -d 'Print version'
5 changes: 5 additions & 0 deletions exports/completion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,17 @@ Register-ArgumentCompleter -Native -CommandName 'pdu' -ScriptBlock {
[CompletionResult]::new('--threads', '--threads', [CompletionResultType]::ParameterName, 'Set the maximum number of threads to spawn. Could be either "auto", "max", or a number')
[CompletionResult]::new('--json-input', '--json-input', [CompletionResultType]::ParameterName, 'Read JSON data from stdin')
[CompletionResult]::new('--json-output', '--json-output', [CompletionResultType]::ParameterName, 'Print JSON data instead of an ASCII chart')
[CompletionResult]::new('--deduplicate-hardlinks', '--deduplicate-hardlinks', [CompletionResultType]::ParameterName, 'Detect and subtract the sizes of hardlinks from their parent directory totals')
[CompletionResult]::new('--detect-links', '--detect-links', [CompletionResultType]::ParameterName, 'Detect and subtract the sizes of hardlinks from their parent directory totals')
[CompletionResult]::new('--dedupe-links', '--dedupe-links', [CompletionResultType]::ParameterName, 'Detect and subtract the sizes of hardlinks from their parent directory totals')
[CompletionResult]::new('--top-down', '--top-down', [CompletionResultType]::ParameterName, 'Print the tree top-down instead of bottom-up')
[CompletionResult]::new('--align-right', '--align-right', [CompletionResultType]::ParameterName, 'Set the root of the bars to the right')
[CompletionResult]::new('--no-sort', '--no-sort', [CompletionResultType]::ParameterName, 'Do not sort the branches in the tree')
[CompletionResult]::new('--silent-errors', '--silent-errors', [CompletionResultType]::ParameterName, 'Prevent filesystem error messages from appearing in stderr')
[CompletionResult]::new('--no-errors', '--no-errors', [CompletionResultType]::ParameterName, 'Prevent filesystem error messages from appearing in stderr')
[CompletionResult]::new('--progress', '--progress', [CompletionResultType]::ParameterName, 'Report progress being made at the expense of performance')
[CompletionResult]::new('--omit-json-shared-details', '--omit-json-shared-details', [CompletionResultType]::ParameterName, 'Do not output `.shared.details` in the JSON output')
[CompletionResult]::new('--omit-json-shared-summary', '--omit-json-shared-summary', [CompletionResultType]::ParameterName, 'Do not output `.shared.summary` in the JSON output')
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
[CompletionResult]::new('-V', '-V ', [CompletionResultType]::ParameterName, 'Print version')
Expand Down
7 changes: 6 additions & 1 deletion exports/completion.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,19 @@ block-count\:"Count numbers of blocks"))' \
'*--column-width=[Maximum widths of the tree column and width of the bar column]:TREE_WIDTH:_default:TREE_WIDTH:_default' \
'--min-ratio=[Minimal size proportion required to appear]:MIN_RATIO:_default' \
'--threads=[Set the maximum number of threads to spawn. Could be either "auto", "max", or a number]:THREADS:_default' \
'(--quantity)--json-input[Read JSON data from stdin]' \
'(--quantity --deduplicate-hardlinks)--json-input[Read JSON data from stdin]' \
'--json-output[Print JSON data instead of an ASCII chart]' \
'--deduplicate-hardlinks[Detect and subtract the sizes of hardlinks from their parent directory totals]' \
'--detect-links[Detect and subtract the sizes of hardlinks from their parent directory totals]' \
'--dedupe-links[Detect and subtract the sizes of hardlinks from their parent directory totals]' \
'--top-down[Print the tree top-down instead of bottom-up]' \
'--align-right[Set the root of the bars to the right]' \
'--no-sort[Do not sort the branches in the tree]' \
'--silent-errors[Prevent filesystem error messages from appearing in stderr]' \
'--no-errors[Prevent filesystem error messages from appearing in stderr]' \
'--progress[Report progress being made at the expense of performance]' \
'--omit-json-shared-details[Do not output \`.shared.details\` in the JSON output]' \
'--omit-json-shared-summary[Do not output \`.shared.summary\` in the JSON output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
Expand Down
Loading
Loading