[Bash-completion-commits] [bash-completion] 01/01: pgrep, pidof, pkill, pwdx, vmstat: Add support for procps-ng
Ville Skyttä
scop-guest at moszumanska.debian.org
Wed Jul 8 10:07:06 UTC 2015
This is an automated email from the git hooks/post-receive script.
scop-guest pushed a commit to branch master
in repository bash-completion.
commit f68589fde4a95c1b30c9cbb70dcfada133f0f09e
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Wed Jul 8 13:06:39 2015 +0300
pgrep, pidof, pkill, pwdx, vmstat: Add support for procps-ng
---
completions/pgrep | 20 +++++++++++++-------
completions/pidof | 10 +++++++++-
completions/pwdx | 10 ++++++++--
completions/vmstat | 4 ++--
4 files changed, 32 insertions(+), 12 deletions(-)
diff --git a/completions/pgrep b/completions/pgrep
index d98ead1..2a458ec 100644
--- a/completions/pgrep
+++ b/completions/pgrep
@@ -6,14 +6,18 @@ _pgrep()
_init_completion || return
case $prev in
- -c|-d|-g|-J|-M|-N|-s|-t|-T|-z)
+ -c|-d|--delimiter|-g|--pgroup|-J|-M|-N|-s|--session|-t|--terminal|-T|-z)
return
;;
- -F)
+ --signal)
+ _signals
+ return
+ ;;
+ -F|--pidfile)
_filedir
return
;;
- -G)
+ -G|--group)
_gids
return
;;
@@ -21,20 +25,22 @@ _pgrep()
COMPREPLY=( $( compgen -W 'any none' -- "$cur" ) )
return
;;
- -P)
+ -P|--parent)
_pids
return
;;
- -u|-U)
+ -u|--euid|-U|--uid)
_uids
return
;;
esac
if [[ $cur == -* ]]; then
- COMPREPLY=( $( compgen -W '$( "$1" --usage 2>&1 |
+ local help='$( _parse_help "$1" )'
+ [[ $help ]] || help='$( "$1" --usage 2>&1 |
sed -e "s/\[-signal\]//" -e "s/\[-SIGNAL\]//" |
- _parse_usage - )' -- "$cur" ) )
+ _parse_usage - )'
+ COMPREPLY=( $( compgen -W "$help" -- "$cur" ) )
[[ $cword -eq 1 && $1 == *pkill ]] && _signals -
return
fi
diff --git a/completions/pidof b/completions/pidof
index 12ac9a7..1dbb613 100644
--- a/completions/pidof
+++ b/completions/pidof
@@ -6,12 +6,20 @@ _pidof()
_init_completion || return
case $prev in
- -o)
+ -h|--help|-V|--version)
+ return
+ ;;
+ -o|--omit-pid)
_pids
return
;;
esac
+ if [[ $cur == -* ]]; then
+ COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+ return
+ fi
+
_pnames
} &&
complete -F _pidof pidof
diff --git a/completions/pwdx b/completions/pwdx
index e91d9bf..8160db4 100644
--- a/completions/pwdx
+++ b/completions/pwdx
@@ -5,10 +5,16 @@ _pwdx()
local cur prev words cword
_init_completion || return
- [[ $prev == -V ]] && return
+ case $prev in
+ -h|--help|-V|--version)
+ return
+ ;;
+ esac
if [[ $cur == -* ]]; then
- COMPREPLY=( $( compgen -W '-V' -- "$cur" ) )
+ local help='$( _parse_help "$1" )'
+ [[ $help ]] || help=-V
+ COMPREPLY=( $( compgen -W "$help" -- "$cur" ) )
else
_pids
fi
diff --git a/completions/vmstat b/completions/vmstat
index 1d3ebb3..9839676 100644
--- a/completions/vmstat
+++ b/completions/vmstat
@@ -6,10 +6,10 @@ _vmstat()
_init_completion || return
case $prev in
- -V|-c|-M|-N|-n|-w|-p)
+ -h|--help|-V|--version|-c|-M|-N|-n|-w|-p|--partition)
return
;;
- -S)
+ -S|--unit)
[[ $OSTYPE == *linux* ]] && \
COMPREPLY=( $( compgen -W 'k K m M' -- "$cur" ) )
return
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/bash-completion/bash-completion.git
More information about the Bash-completion-commits
mailing list