Skip to content

Commit 52e6bea

Browse files
committed
Update completion files
1 parent 5ad3a52 commit 52e6bea

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

exports/completion.bash

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,8 @@ _pdu() {
5959
esac
6060
}
6161

62-
complete -F _pdu -o bashdefault -o default pdu
62+
if [[ "${BASH_VERSINFO[0]}" -eq 4 && "${BASH_VERSINFO[1]}" -ge 4 || "${BASH_VERSINFO[0]}" -gt 4 ]]; then
63+
complete -F _pdu -o nosort -o bashdefault -o default pdu
64+
else
65+
complete -F _pdu -o bashdefault -o default pdu
66+
fi

exports/completion.fish

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
complete -c pdu -l bytes-format -d 'How to display the numbers of bytes' -r -f -a "{plain Display plain number of bytes without units,metric Use metric scale\, i.e. 1K = 1000B\, 1M = 1000K\, and so on,binary Use binary scale\, i.e. 1K = 1024B\, 1M = 1024K\, and so on}"
2-
complete -c pdu -l quantity -d 'Aspect of the files/directories to be measured' -r -f -a "{apparent-size Measure apparent sizes,block-size Measure block sizes (block-count * 512B),block-count Count numbers of blocks}"
1+
complete -c pdu -l bytes-format -d 'How to display the numbers of bytes' -r -f -a "{plain 'Display plain number of bytes without units',metric 'Use metric scale, i.e. 1K = 1000B, 1M = 1000K, and so on',binary 'Use binary scale, i.e. 1K = 1024B, 1M = 1024K, and so on'}"
2+
complete -c pdu -l quantity -d 'Aspect of the files/directories to be measured' -r -f -a "{apparent-size 'Measure apparent sizes',block-size 'Measure block sizes (block-count * 512B)',block-count 'Count numbers of blocks'}"
33
complete -c pdu -l max-depth -d 'Maximum depth to display the data (must be greater than 0)' -r
44
complete -c pdu -l total-width -d 'Width of the visualization' -r
55
complete -c pdu -l column-width -d 'Maximum widths of the tree column and width of the bar column' -r

exports/completion.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Register-ArgumentCompleter -Native -CommandName 'pdu' -ScriptBlock {
3636
[CompletionResult]::new('--progress', 'progress', [CompletionResultType]::ParameterName, 'Report progress being made at the expense of performance')
3737
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
3838
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
39-
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version')
39+
[CompletionResult]::new('-V', 'V ', [CompletionResultType]::ParameterName, 'Print version')
4040
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Print version')
4141
break
4242
}

exports/completion.zsh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,8 @@ _pdu_commands() {
4646
_describe -t commands 'pdu commands' commands "$@"
4747
}
4848

49-
_pdu "$@"
49+
if [ "$funcstack[1]" = "_pdu" ]; then
50+
_pdu "$@"
51+
else
52+
compdef _pdu pdu
53+
fi

0 commit comments

Comments
 (0)