Implement perf data completion

This commit is contained in:
Shohei YOSHIDA 2020-05-12 23:54:47 +09:00
parent 2441475f56
commit 2c2cc6cc43
1 changed files with 15 additions and 1 deletions

View File

@ -143,7 +143,10 @@ _perf() {
&& ret=0 && ret=0
;; ;;
(data) (data)
# TODO not implemented _arguments \
'1:command:((convert))' \
'*:: :->data_args' \
&& ret=0
;; ;;
(diff) (diff)
_arguments \ _arguments \
@ -470,6 +473,17 @@ _perf() {
;; ;;
esac esac
;; ;;
(data_args)
if [[ $words[1] == "convert" ]]; then
_arguments \
'--to-ctf=[specify the path of CTF data directory]:data_dir:_files -/' \
'-i[specify input perf data file path]:path:_files' \
'(-f --force)'{-f,--force}'[do not complain do it]' \
'(-v --verbose)'{-v,--verbose}'[be more verbose]' \
'--all[convert all events including non-sample events to output]' \
&& ret=0
fi
;;
(mem_args) (mem_args)
case $words[1] in case $words[1] in
(record) (record)