Skip to content

Commit 8611927

Browse files
committed
*: Remove redundant return 0's
1 parent 72beabe commit 8611927

File tree

247 files changed

+1256
-1387
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

247 files changed

+1256
-1387
lines changed

bash_completion

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ _filedir()
558558
{
559559
local IFS=$'\n'
560560

561-
_tilde "$cur" || return 0
561+
_tilde "$cur" || return
562562

563563
local -a toks
564564
local x tmp
@@ -778,7 +778,7 @@ __parse_options()
778778
*) break ;;
779779
esac
780780
done
781-
[[ $option ]] || return 0
781+
[[ $option ]] || return
782782

783783
IFS=$' \t\n' # affects parsing of the regexps below...
784784

@@ -1183,7 +1183,7 @@ _service()
11831183
_init_completion || return
11841184

11851185
# don't complete past 2nd token
1186-
[[ $cword -gt 2 ]] && return 0
1186+
[[ $cword -gt 2 ]] && return
11871187

11881188
if [[ $cword -eq 1 && $prev == ?(*/)service ]]; then
11891189
_services
@@ -1438,8 +1438,6 @@ _user_at_host()
14381438
else
14391439
COMPREPLY=( $( compgen -u -- "$cur" ) )
14401440
fi
1441-
1442-
return 0
14431441
}
14441442
shopt -u hostcomplete && complete -F _user_at_host -o nospace talk ytalk finger
14451443

@@ -1626,7 +1624,6 @@ _known_hosts_real()
16261624

16271625
__ltrim_colon_completions "$prefix$user$cur"
16281626

1629-
return 0
16301627
} # _known_hosts_real()
16311628
complete -F _known_hosts traceroute traceroute6 tracepath tracepath6 \
16321629
fping fping6 telnet rsh rlogin ftp dig mtr ssh-installkeys showmount
@@ -1647,7 +1644,7 @@ _cd()
16471644
# ./ or ../
16481645
if [[ -z "${CDPATH:-}" || "$cur" == ?(.)?(.)/* ]]; then
16491646
_filedir -d
1650-
return 0
1647+
return
16511648
fi
16521649

16531650
local -r mark_dirs=$(_rl_enabled mark-directories && echo y)
@@ -1674,7 +1671,7 @@ _cd()
16741671
fi
16751672
fi
16761673

1677-
return 0
1674+
return
16781675
}
16791676
if shopt -q cdable_vars; then
16801677
complete -v -F _cd -o nospace cd pushd
@@ -1812,33 +1809,33 @@ _longopt()
18121809

18131810
case "${prev,,}" in
18141811
--help|--usage|--version)
1815-
return 0
1812+
return
18161813
;;
18171814
--*dir*)
18181815
_filedir -d
1819-
return 0
1816+
return
18201817
;;
18211818
--*file*|--*path*)
18221819
_filedir
1823-
return 0
1820+
return
18241821
;;
18251822
--+([-a-z0-9_]))
18261823
local argtype=$( LC_ALL=C $1 --help 2>&1 | command sed -ne \
18271824
"s|.*$prev\[\{0,1\}=[<[]\{0,1\}\([-A-Za-z0-9_]\{1,\}\).*|\1|p" )
18281825
case ${argtype,,} in
18291826
*dir*)
18301827
_filedir -d
1831-
return 0
1828+
return
18321829
;;
18331830
*file*|*path*)
18341831
_filedir
1835-
return 0
1832+
return
18361833
;;
18371834
esac
18381835
;;
18391836
esac
18401837

1841-
$split && return 0
1838+
$split && return
18421839

18431840
if [[ "$cur" == -* ]]; then
18441841
COMPREPLY=( $( compgen -W "$( LC_ALL=C $1 --help 2>&1 | \
@@ -1865,7 +1862,7 @@ _filedir_xspec()
18651862
local cur prev words cword
18661863
_init_completion || return
18671864

1868-
_tilde "$cur" || return 0
1865+
_tilde "$cur" || return
18691866

18701867
local IFS=$'\n' xspec=${_xspecs[${1##*/}]} tmp
18711868
local -a toks

completions/_chsh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ _chsh()
1010

1111
case $prev in
1212
--list-shells|--help|-v|--version)
13-
return 0
13+
return
1414
;;
1515
-s|--shell)
1616
_shells
17-
return 0
17+
return
1818
;;
1919
esac
2020

@@ -24,7 +24,6 @@ _chsh()
2424
_allowed_users
2525
fi
2626

27-
return 0
2827
} &&
2928
complete -F _chsh chsh
3029

completions/_mock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,20 @@ _mock()
2424
case $prev in
2525
-h|--help|--copyin|--copyout|--arch|-D|--define|--with|--without|\
2626
--uniqueext|--rpmbuild_timeout|--sources|--cwd)
27-
return 0
27+
return
2828
;;
2929
-r|--root)
3030
COMPREPLY=( $( compgen -W "$( command ls $cfgdir )" -- "$cur" ) )
3131
COMPREPLY=( ${COMPREPLY[@]/%.cfg/} )
32-
return 0
32+
return
3333
;;
3434
--configdir|--resultdir)
3535
_filedir -d
36-
return 0
36+
return
3737
;;
3838
--spec)
3939
_filedir spec
40-
return 0
40+
return
4141
;;
4242
--target)
4343
# Yep, compatible archs, not compatible build archs
@@ -47,15 +47,15 @@ _mock()
4747
COMPREPLY=( $( compgen -W "$( command rpm --showrc | \
4848
command sed -ne 's/^\s*compatible\s\s*archs\s*:\s*\(.*\)/\1/i p' )" \
4949
-- "$cur" ) )
50-
return 0
50+
return
5151
;;
5252
--enable-plugin|--disable-plugin)
5353
COMPREPLY=( $( compgen -W "$plugins" -- "$cur" ) )
54-
return 0
54+
return
5555
;;
5656
esac
5757

58-
$split && return 0
58+
$split && return
5959

6060
if [[ "$cur" == -* ]] ; then
6161
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )

completions/_modules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ _module ()
7777
;;
7878
esac
7979
fi
80-
return 0
80+
8181
} &&
8282
complete -F _module -o default module
8383

completions/_nmcli

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -42,35 +42,35 @@ _nmcli()
4242
case $prev in
4343
-m|--mode)
4444
COMPREPLY=( $( compgen -W 'tabular multiline' -- "$cur" ) )
45-
return 0
45+
return
4646
;;
4747
-f|--fields)
4848
COMPREPLY=( $( compgen -W 'all common' -- "$cur" ) )
49-
return 0
49+
return
5050
;;
5151
-e|--escape)
5252
_nmcli_list "yes no"
53-
return 0
53+
return
5454
;;
5555
id)
5656
_nmcli_con_id
57-
return 0
57+
return
5858
;;
5959
uuid)
6060
_nmcli_con_uuid
61-
return 0
61+
return
6262
;;
6363
iface)
6464
_available_interfaces
65-
return 0
65+
return
6666
;;
6767
bssid)
6868
_nmcli_ab_bssid
69-
return 0
69+
return
7070
;;
7171
wep-key-type)
7272
_nmcli_list "key phrase"
73-
return 0
73+
return
7474
;;
7575
esac
7676

@@ -90,23 +90,23 @@ _nmcli()
9090
case $command in
9191
enable)
9292
_nmcli_list "true false"
93-
return 0
93+
return
9494
;;
9595
sleep)
9696
_nmcli_list "true false"
97-
return 0
97+
return
9898
;;
9999
wifi)
100100
_nmcli_list "on off"
101-
return 0
101+
return
102102
;;
103103
wwan)
104104
_nmcli_list "on off"
105-
return 0
105+
return
106106
;;
107107
wimax)
108108
_nmcli_list "on off"
109-
return 0
109+
return
110110
;;
111111
esac
112112

@@ -117,7 +117,7 @@ _nmcli()
117117
case $command in
118118
list)
119119
COMPREPLY=( $( compgen -W 'id uuid' -- "$cur" ) )
120-
return 0
120+
return
121121
;;
122122
up)
123123
if [[ "$cur" == -* ]]; then
@@ -127,15 +127,15 @@ _nmcli()
127127
COMPREPLY=( $( compgen -W 'id uuid iface ap nsp' \
128128
-- "$cur" ) )
129129
fi
130-
return 0
130+
return
131131
;;
132132
down)
133133
COMPREPLY=( $( compgen -W 'id uuid' -- "$cur" ) )
134-
return 0
134+
return
135135
;;
136136
delete)
137137
COMPREPLY=( $( compgen -W 'id uuid' -- "$cur" ) )
138-
return 0
138+
return
139139
;;
140140
esac
141141

@@ -146,7 +146,7 @@ _nmcli()
146146
case $command in
147147
list)
148148
COMPREPLY=( $( compgen -W 'iface' -- "$cur" ) )
149-
return 0
149+
return
150150
;;
151151
disconnect)
152152
if [[ "$cur" == -* ]]; then
@@ -155,7 +155,7 @@ _nmcli()
155155
else
156156
COMPREPLY=( $( compgen -W 'iface' -- "$cur" ) )
157157
fi
158-
return 0
158+
return
159159
;;
160160
wifi)
161161
local subcommand=${words[3]}
@@ -164,7 +164,7 @@ _nmcli()
164164
list)
165165
COMPREPLY=( $( compgen -W 'iface bssid' \
166166
-- "$cur" ) )
167-
return 0
167+
return
168168
;;
169169
connect)
170170
if [[ "$cur" == -* ]]; then
@@ -179,12 +179,12 @@ _nmcli()
179179
-- "$cur" ) )
180180
fi
181181
fi
182-
return 0
182+
return
183183
;;
184184
esac
185185

186186
COMPREPLY=( $( compgen -W 'list connect' -- "$cur" ) )
187-
return 0
187+
return
188188
;;
189189
esac
190190

@@ -195,7 +195,6 @@ _nmcli()
195195

196196
fi
197197

198-
return 0
199198
} &&
200199
complete -F _nmcli nmcli
201200

completions/_repomanage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ _repomanage()
88
local cur prev words cword split
99
_init_completion -s || return
1010

11-
[[ "$prev" == -@([hk]|-help|-keep) ]] && return 0
11+
[[ "$prev" == -@([hk]|-help|-keep) ]] && return
1212

1313
$split && return
1414

completions/_reptyr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ _reptyr()
1010

1111
case $prev in
1212
-l)
13-
return 0
13+
return
1414
;;
1515
esac
1616

1717
if [[ $cur == -* ]]; then
1818
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
19-
return 0
19+
return
2020
fi
2121

2222
[[ $prev != +([0-9]) ]] && _pids

completions/_rtcwake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ _rtcwake()
1010

1111
case "$prev" in
1212
--help|-h|--version|-V|--seconds|-s|--time|-t)
13-
return 0
13+
return
1414
;;
1515
--mode|-m)
1616
COMPREPLY=( $( compgen -W 'standby mem disk on no off' -- "$cur" ) )
17-
return 0
17+
return
1818
;;
1919
--device|-d)
2020
COMPREPLY=( $( command ls -d /dev/rtc?* 2>/dev/null ) )
2121
COMPREPLY=( $( compgen -W '${COMPREPLY[@]#/dev/}' -- "$cur" ) )
22-
return 0
22+
return
2323
;;
2424
esac
2525

26-
$split && return 0
26+
$split && return
2727

2828
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
2929
} &&

0 commit comments

Comments
 (0)