Skip to content

Commit

Permalink
test/shfmt: upgrade to 3.1.2, reformat with it
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Jun 27, 2020
1 parent 8200b9a commit de35c91
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repos:
- id: shfmt
name: shfmt
language: golang
additional_dependencies: [mvdan.cc/sh/v3/cmd/shfmt@v3.1.1]
additional_dependencies: [mvdan.cc/sh/v3/cmd/shfmt@v3.1.2]
entry: shfmt
args: [-w, -s]
types: [text]
Expand Down
12 changes: 6 additions & 6 deletions bash_completion
Original file line number Diff line number Diff line change
Expand Up @@ -1098,31 +1098,31 @@ _expand()
if [[ $OSTYPE == *@(solaris|aix)* ]]; then
# This function completes on process IDs.
_pids()
{
{
COMPREPLY=($(compgen -W '$(command ps -efo pid | command sed 1d)' -- "$cur"))
}

_pgids()
{
{
COMPREPLY=($(compgen -W '$(command ps -efo pgid | command sed 1d)' -- "$cur"))
}
_pnames()
{
{
COMPREPLY=($(compgen -X '<defunct>' -W '$(command ps -efo comm | \
command sed -e 1d -e "s:.*/::" -e "s/^-//" | sort -u)' -- "$cur"))
}
else
_pids()
{
{
COMPREPLY=($(compgen -W '$(command ps axo pid=)' -- "$cur"))
}
_pgids()
{
{
COMPREPLY=($(compgen -W '$(command ps axo pgid=)' -- "$cur"))
}
# @param $1 if -s, don't try to avoid truncated command names
_pnames()
{
{
local -a procs
if [[ ${1-} == -s ]]; then
procs=($(command ps axo comm | command sed -e 1d))
Expand Down
4 changes: 2 additions & 2 deletions completions/aptitude
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

_have grep-status && {
_comp_dpkg_hold_packages()
{
{
grep-status -P -e "^$1" -a -FStatus 'hold' -n -s Package
}
} || {
_comp_dpkg_hold_packages()
{
{
command grep -B 2 'hold' /var/lib/dpkg/status |
awk "/Package: $1/ { print \$2 }"
}
Expand Down
2 changes: 1 addition & 1 deletion completions/arch
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# it for the coreutils/util-linux-ng one.
_have mailmanctl &&
_arch()
{
{
local cur prev words cword split
_init_completion -s || return

Expand Down
8 changes: 4 additions & 4 deletions completions/dpkg
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

_have grep-status && {
_comp_dpkg_installed_packages()
{
{
grep-status -P -e "^$1" -a -FStatus 'ok installed' -n -s Package
}
} || {
_comp_dpkg_installed_packages()
{
{
command grep -A 1 "Package: $1" /var/lib/dpkg/status 2>/dev/null |
command grep -B 1 -Ee "ok installed|half-installed|unpacked| \
half-configured" \
Expand All @@ -18,12 +18,12 @@ _have grep-status && {

_have grep-status && {
_comp_dpkg_purgeable_packages()
{
{
grep-status -P -e "^$1" -a -FStatus 'ok installed' -o -FStatus 'ok config-files' -n -s Package
}
} || {
_comp_dpkg_purgeable_packages()
{
{
command grep -A 1 "Package: $1" /var/lib/dpkg/status 2>/dev/null |
command grep -B 1 -Ee "ok installed|half-installed|unpacked| \
half-configured|config-files" \
Expand Down
2 changes: 1 addition & 1 deletion completions/pkg-get
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ _pkg_get_get_catalog_file()
echo "$catalog_file"
} &&
_pkg_get()
{
{
local cur prev file catalog_file url command
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
Expand Down
2 changes: 1 addition & 1 deletion completions/screen
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ _screen_sessions()
fi
} &&
_screen()
{
{
local cur prev words cword
_init_completion || return

Expand Down

0 comments on commit de35c91

Please sign in to comment.