lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 30 Nov 2013 04:49:57 -0800 From: tip-bot for Ramkumar Ramachandra <tipbot@...or.com> To: linux-tip-commits@...r.kernel.org Cc: acme@...hat.com, linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org, artagnon@...il.com, tglx@...utronix.de Subject: [tip:perf/core] perf completion: Factor out call to __ltrim_colon_completions Commit-ID: 37e72c31061521d6f0e4b7fe47cd5748280ed691 Gitweb: http://git.kernel.org/tip/37e72c31061521d6f0e4b7fe47cd5748280ed691 Author: Ramkumar Ramachandra <artagnon@...il.com> AuthorDate: Sun, 17 Nov 2013 21:43:25 +0530 Committer: Arnaldo Carvalho de Melo <acme@...hat.com> CommitDate: Wed, 27 Nov 2013 14:58:35 -0300 perf completion: Factor out call to __ltrim_colon_completions In our sole callsite, __ltrim_colon_completions is called after __perfcomp, to modify the COMPREPLY set by the invocation. This is problematic, because in the zsh equivalent (using compset/ compadd), we'll have to generate completions in one-shot. So factor out this entire callsite into a special override'able __perfcomp_colon function; we will override it when introducing zsh support. Signed-off-by: Ramkumar Ramachandra <artagnon@...il.com> Cc: Ingo Molnar <mingo@...nel.org> Link: http://lkml.kernel.org/r/1384704807-15779-4-git-send-email-artagnon@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com> --- tools/perf/bash_completion | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/perf/bash_completion b/tools/perf/bash_completion index 82431268..573599b 100644 --- a/tools/perf/bash_completion +++ b/tools/perf/bash_completion @@ -94,6 +94,12 @@ __perfcomp () COMPREPLY=( $( compgen -W "$1" -- "$2" ) ) } +__perfcomp_colon () +{ + __perfcomp "$1" "$2" + __ltrim_colon_completions $cur +} + __perf_main () { local cmd @@ -114,8 +120,7 @@ __perf_main () # List possible events for -e option elif [[ $prev == "-e" && "${words[1]}" == @(record|stat|top) ]]; then evts=$($cmd list --raw-dump) - __perfcomp "$evts" "$cur" - __ltrim_colon_completions $cur + __perfcomp_colon "$evts" "$cur" # List long option names elif [[ $cur == --* ]]; then subcmd=${words[1]} -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists