pidof: Don't check OS type (Alioth #311403)
Also drop non-existent option arguments completion. Reviewed-by: Ville Skyttä <ville.skytta@iki.fi>
This commit is contained in:
parent
6843989baf
commit
9ab064fb17
1
completions/.gitignore
vendored
1
completions/.gitignore
vendored
@ -94,7 +94,6 @@ pbzip2
|
|||||||
pccardctl
|
pccardctl
|
||||||
perldoc
|
perldoc
|
||||||
phing
|
phing
|
||||||
pidof
|
|
||||||
pigz
|
pigz
|
||||||
pinfo
|
pinfo
|
||||||
ping6
|
ping6
|
||||||
|
@ -210,6 +210,7 @@ bashcomp_DATA = a2x \
|
|||||||
passwd \
|
passwd \
|
||||||
perl \
|
perl \
|
||||||
pgrep \
|
pgrep \
|
||||||
|
pidof \
|
||||||
pine \
|
pine \
|
||||||
ping \
|
ping \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
@ -425,7 +426,6 @@ CLEANFILES = \
|
|||||||
pccardctl \
|
pccardctl \
|
||||||
perldoc \
|
perldoc \
|
||||||
phing \
|
phing \
|
||||||
pidof \
|
|
||||||
pigz \
|
pigz \
|
||||||
pinfo \
|
pinfo \
|
||||||
ping6 \
|
ping6 \
|
||||||
@ -683,10 +683,6 @@ symlinks:
|
|||||||
rm -f $(targetdir)/$$file && \
|
rm -f $(targetdir)/$$file && \
|
||||||
$(LN_S) perl $(targetdir)/$$file ; \
|
$(LN_S) perl $(targetdir)/$$file ; \
|
||||||
done
|
done
|
||||||
for file in pidof ; do \
|
|
||||||
rm -f $(targetdir)/$$file && \
|
|
||||||
$(LN_S) pgrep $(targetdir)/$$file ; \
|
|
||||||
done
|
|
||||||
for file in alpine ; do \
|
for file in alpine ; do \
|
||||||
rm -f $(targetdir)/$$file && \
|
rm -f $(targetdir)/$$file && \
|
||||||
$(LN_S) pine $(targetdir)/$$file ; \
|
$(LN_S) pine $(targetdir)/$$file ; \
|
||||||
|
@ -32,7 +32,4 @@ _pgrep()
|
|||||||
} &&
|
} &&
|
||||||
complete -F _pgrep pgrep
|
complete -F _pgrep pgrep
|
||||||
|
|
||||||
# Linux pidof(8) completion.
|
|
||||||
[[ $OSTYPE == *linux* ]] && complete -F _pgrep pidof
|
|
||||||
|
|
||||||
# ex: ts=4 sw=4 et filetype=sh
|
# ex: ts=4 sw=4 et filetype=sh
|
||||||
|
19
completions/pidof
Normal file
19
completions/pidof
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# pidof(8) completion -*- shell-script -*-
|
||||||
|
|
||||||
|
_pidof()
|
||||||
|
{
|
||||||
|
local cur prev words cword
|
||||||
|
_init_completion || return
|
||||||
|
|
||||||
|
case $prev in
|
||||||
|
-o)
|
||||||
|
_pids
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
_pnames
|
||||||
|
} &&
|
||||||
|
complete -F _pidof pidof
|
||||||
|
|
||||||
|
# ex: ts=4 sw=4 et filetype=sh
|
1
test/completion/pidof.exp
Normal file
1
test/completion/pidof.exp
Normal file
@ -0,0 +1 @@
|
|||||||
|
assert_source_completions pidof
|
20
test/lib/completions/pidof.exp
Normal file
20
test/lib/completions/pidof.exp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
proc setup {} {
|
||||||
|
save_env
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
proc teardown {} {
|
||||||
|
assert_env_unmodified
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setup
|
||||||
|
|
||||||
|
|
||||||
|
assert_complete_any "pidof "
|
||||||
|
|
||||||
|
|
||||||
|
sync_after_int
|
||||||
|
|
||||||
|
|
||||||
|
teardown
|
Loading…
x
Reference in New Issue
Block a user