diff --git a/src/_perf b/src/_perf index 83f4895..a1291cd 100644 --- a/src/_perf +++ b/src/_perf @@ -143,7 +143,10 @@ _perf() { && ret=0 ;; (data) - # TODO not implemented + _arguments \ + '1:command:((convert))' \ + '*:: :->data_args' \ + && ret=0 ;; (diff) _arguments \ @@ -470,6 +473,17 @@ _perf() { ;; 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) case $words[1] in (record)