From 2c2cc6cc43519ff361ef48b45fcd355fc98dbcd8 Mon Sep 17 00:00:00 2001 From: Shohei YOSHIDA Date: Tue, 12 May 2020 23:54:47 +0900 Subject: [PATCH] Implement perf data completion --- src/_perf | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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)