summaryrefslogtreecommitdiffstats
path: root/bash-completion/lsipc
diff options
context:
space:
mode:
Diffstat (limited to 'bash-completion/lsipc')
-rw-r--r--bash-completion/lsipc74
1 files changed, 40 insertions, 34 deletions
diff --git a/bash-completion/lsipc b/bash-completion/lsipc
index 6ce0551a5..ffe44b7d1 100644
--- a/bash-completion/lsipc
+++ b/bash-completion/lsipc
@@ -12,15 +12,27 @@ _lsipc_module()
'-h'|'--help'|'-V'|'--version')
return 0
;;
+ '--time-format')
+ COMPREPLY=( $(compgen -W "short full iso" -- $cur) )
+ return 0
+ ;;
'-o'|'--output')
local prefix realcur OUTPUT_ALL OUTPUT
realcur="${cur##*,}"
prefix="${cur%$realcur}"
- OUTPUT_ALL="GENERAL KEY ID OWNER PERMS CUID
- CGID UID GID CHANGE MESSAGE USEDBYTES
- MSGS SEND RECV LSPID LRPID SHARED BYTES
- NATTCH STATUS ATTACH DETACH CPID LPID NSEMS
- LASTOP"
+ OUTPUT_ALL="
+ KEY ID OWNER PERMS CUID CUSER CGID
+ CGROUP UID USER GID GROUP CTIME
+
+ SIZE NATTCH STATUS ATTACH DETACH
+ COMMAND CPID LPID
+
+ USEDBYTES MSGS SEND RECV LSPID LRPID
+
+ NSEMS OTIME
+
+ RESOURCE DESCRIPTION LIMIT USED USE%
+ "
for WORD in $OUTPUT_ALL; do
if ! [[ $prefix == *"$WORD"* ]]; then
OUTPUT="$WORD $OUTPUT"
@@ -31,35 +43,29 @@ _lsipc_module()
return 0
;;
esac
- case $cur in
- -*)
- OPTS="--id
- --help
- --version
- --shmems
- --queues
- --semaphores
- --colon-separate
- --creator
- --export
- --global
- --json
- --newline
- --noheadings
- --notruncate
- --output
- --pid
- --print0
- --raw
- --time
- --time-format"
- COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
- return 0
- ;;
- esac
- local IFS=$'\n'
- compopt -o filenames
- COMPREPLY=( $(compgen -f -- $cur) )
+ OPTS="
+ --shmems
+ --queues
+ --semaphores
+ --global
+ --id
+ --noheadings
+ --notruncate
+ --time-format
+ --bytes
+ --creator
+ --export
+ --json
+ --newline
+ --list
+ --output
+ --numeric-perms
+ --raw
+ --time
+ --help
+ --version
+ "
+ COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
return 0
}
complete -F _lsipc_module lsipc