about summary refs log tree commit diff
path: root/Completion/User/_gprof
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/User/_gprof')
-rw-r--r--Completion/User/_gprof6
1 files changed, 4 insertions, 2 deletions
diff --git a/Completion/User/_gprof b/Completion/User/_gprof
index 211a7a15f..cbc362331 100644
--- a/Completion/User/_gprof
+++ b/Completion/User/_gprof
@@ -1,6 +1,6 @@
 #compdef gprof
 
-local state line ret=1
+local context state line ret=1
 typeset -A opt_args
 
 _arguments -s -{a,b,c,D,h,i,l,L,s,T,v,w,x,y,z} \
@@ -17,6 +17,8 @@ _arguments -s -{a,b,c,D,h,i,l,L,s,T,v,w,x,y,z} \
 if [[ -n "$state" ]]; then
   local cmd pair expl
 
+  _tags "${context}" functions || return 1
+
   [[ "$state" = pair ]] && pair=yes
 
   if [[ $#line -gt 1 ]]; then
@@ -46,7 +48,7 @@ if [[ -n "$state" ]]; then
     else
       _description expl function
     fi
-    compadd -M 'r:|_=* r:|=*' - "$_gprof_funcs[@]" && ret=0
+    compadd "$expl[@]" -M 'r:|_=* r:|=*' - "$_gprof_funcs[@]" && ret=0
   else
     return 1
   fi