Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
stages: [commit-msg]

- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.5.1-1
rev: v3.6.0-1
hooks:
- id: shfmt-docker
types: [text]
Expand Down
10 changes: 5 additions & 5 deletions bash_completion
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ _get_cword()
_get_pword()
{
if ((COMP_CWORD >= 1)); then
_get_cword "${@:-}" 1
_get_cword "${@-}" 1
fi
}

Expand Down Expand Up @@ -1371,9 +1371,9 @@ _available_interfaces()
local PATH=$PATH:/sbin

COMPREPLY=($({
if [[ ${1:-} == -w ]]; then
if [[ ${1-} == -w ]]; then
iwconfig
elif [[ ${1:-} == -a ]]; then
elif [[ ${1-} == -a ]]; then
ifconfig || ip -c=never link show up || ip link show up
else
ifconfig -a || ip -c=never link show || ip link show
Expand Down Expand Up @@ -2226,7 +2226,7 @@ _cd()

# Use standard dir completion if no CDPATH or parameter starts with /,
# ./ or ../
if [[ ! ${CDPATH:-} || $cur == ?(.)?(.)/* ]]; then
if [[ ! ${CDPATH-} || $cur == ?(.)?(.)/* ]]; then
_filedir -d
return
fi
Expand Down Expand Up @@ -2414,7 +2414,7 @@ complete -F _comp_root_command fakeroot gksu gksudo kdesudo really
# Return true if the completion should be treated as running as root
_complete_as_root()
{
[[ $EUID -eq 0 || ${root_command:-} ]]
[[ $EUID -eq 0 || ${root_command-} ]]
}

_longopt()
Expand Down
6 changes: 3 additions & 3 deletions completions/cvs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
_cvs_entries()
{
local prefix=${cur%/*}/ IFS=$'\n'
[[ -e ${prefix:-}CVS/Entries ]] || prefix=""
entries=($(cut -d/ -f2 -s ${prefix:-}CVS/Entries 2>/dev/null))
[[ -e ${prefix-}CVS/Entries ]] || prefix=""
entries=($(cut -d/ -f2 -s ${prefix-}CVS/Entries 2>/dev/null))
if [[ $entries ]]; then
entries=("${entries[@]/#/${prefix:-}}")
entries=("${entries[@]/#/${prefix-}}")
compopt -o filenames
fi
}
Expand Down
2 changes: 1 addition & 1 deletion completions/hcitool
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

_bluetooth_addresses()
{
if [[ ${COMP_BLUETOOTH_SCAN:-} ]]; then
if [[ ${COMP_BLUETOOTH_SCAN-} ]]; then
COMPREPLY+=($(compgen -W "$(hcitool scan |
awk '/^\t/{print $1}')" -- "$cur"))
fi
Expand Down
3 changes: 1 addition & 2 deletions completions/ipmitool
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ _ipmitool()

shell) ;;

\
exec)
exec)
_filedir
;;

Expand Down
2 changes: 1 addition & 1 deletion completions/pkgadd
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ _pkgadd()
local -a tmplist
for filedir in $(/bin/ls -1 $device); do
if [[ -d "$device/$filedir" && -f "$device/$filedir/pkginfo" ]]; then
tmplist+=(${tmplist[@]:-} "$filedir")
tmplist+=(${tmplist[@]-} "$filedir")
fi
done
pkginst_list="${tmplist[*]}"
Expand Down
4 changes: 2 additions & 2 deletions completions/smbclient
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ _samba_resolve_order()

_samba_domains()
{
if [[ ${COMP_SAMBA_SCAN:-} ]]; then
if [[ ${COMP_SAMBA_SCAN-} ]]; then
COMPREPLY=($(compgen -W '$(smbtree -N -D)' -- "$cur"))
fi
}

_samba_hosts()
{
if [[ ${COMP_SAMBA_SCAN:-} ]]; then
if [[ ${COMP_SAMBA_SCAN-} ]]; then
COMPREPLY=($(compgen -W "$(
smbtree -N -S |
command sed -ne 's/^[[:space:]]*\\\\*\([^[:space:]]*\).*/\1/p'
Expand Down