]> git.proxmox.com Git - ceph.git/blob - ceph/src/bash_completion/radosgw-admin
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / bash_completion / radosgw-admin
1 #
2 # Ceph - scalable distributed file system
3 #
4 # Copyright (C) 2011 Wido den Hollander <wido@widodh.nl>
5 #
6 # This is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Lesser General Public
8 # License version 2.1, as published by the Free Software
9 # Foundation. See file COPYING.
10 #
11
12 _radosgw_admin()
13 {
14 local cur prev
15
16 COMPREPLY=()
17 cur="${COMP_WORDS[COMP_CWORD]}"
18 prev="${COMP_WORDS[COMP_CWORD-1]}"
19
20 if [[ ${cur} == -* ]] ; then
21 COMPREPLY=( $(compgen -W "--uid --subuser --access-key --os-user --email --auth_uid --secret --os-secret --gen-access-key --gen-secret \
22 --access --display-name --bucket --object --date --conf --name --id --version -s -w" -- ${cur}) )
23 return 0
24 fi
25
26 case "${prev}" in
27 --conf | -c)
28 COMPREPLY=( $(compgen -f ${cur}) )
29 return 0
30 ;;
31 -m)
32 COMPREPLY=( $(compgen -A hostname ${cur}) )
33 return 0
34 ;;
35 user)
36 COMPREPLY=( $(compgen -W "create modify info rm" -- ${cur}) )
37 return 0
38 ;;
39 subuser)
40 COMPREPLY=( $(compgen -W "create modify rm" -- ${cur}) )
41 return 0
42 ;;
43 key)
44 COMPREPLY=( $(compgen -W "create rm" -- ${cur}) )
45 return 0
46 ;;
47 buckets)
48 COMPREPLY=( $(compgen -W "list unlink" -- ${cur}) )
49 return 0
50 ;;
51 *)
52 COMPREPLY=( $(compgen -W "user subuser key buckets policy log" -- ${cur}) )
53 return 0
54 ;;
55 esac
56 }
57 complete -F _radosgw_admin radosgw-admin