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:
Igor Murzov 2011-11-15 23:46:25 +03:00
parent 6843989baf
commit 9ab064fb17
6 changed files with 41 additions and 9 deletions

View File

@ -94,7 +94,6 @@ pbzip2
pccardctl pccardctl
perldoc perldoc
phing phing
pidof
pigz pigz
pinfo pinfo
ping6 ping6

View File

@ -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 ; \

View 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
View 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

View File

@ -0,0 +1 @@
assert_source_completions pidof

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}
proc teardown {} {
assert_env_unmodified
}
setup
assert_complete_any "pidof "
sync_after_int
teardown