mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 10:57:30 +08:00
Add functiopn prototype completions for valgrind --alloc-fn
darcs-hash:20060224135618-ac50b-bcd2fa57593f6a5c9f41b9513ac25f859baf1659.gz
This commit is contained in:
parent
1075ca69b0
commit
dad2b93d1e
|
@ -17,7 +17,7 @@ complete -xc valgrind -l $skin -d (_ "Skin") -a "
|
|||
massif\tHeap\ profiler
|
||||
"
|
||||
|
||||
eval function __fish_valgrind_skin\; contains -- --$skin=\$argv \(commandline -cpo\)\;end
|
||||
eval "function __fish_valgrind_skin; contains -- --$skin=\$argv (commandline -cpo);end"
|
||||
|
||||
set -e $skin
|
||||
|
||||
|
@ -66,7 +66,7 @@ complete -n "__fish_valgrind_skin cachegrind" -xc valgrind -l L2 -d (_ "Type of
|
|||
|
||||
|
||||
# Massif-specific options
|
||||
complete -c valgrind -n "__fish_valgrind_skin massif" -l alloc-fn -d (_ "Specify a function that allocates memory") -x
|
||||
complete -c valgrind -n "__fish_valgrind_skin massif" -l alloc-fn -d (_ "Specify a function that allocates memory") -x -a "(__fish_print_function_prototypes)"
|
||||
complete -c valgrind -n "__fish_valgrind_skin massif" -x -l heap -d 'Profile heap usage' -a 'yes\t"Profile heap usage" no\t"Do not profile heap usage"'
|
||||
complete -c valgrind -n "__fish_valgrind_skin massif" -x -l heap-admin -d (_ "The number of bytes of heap overhead per allocation")
|
||||
complete -c valgrind -n "__fish_valgrind_skin massif" -x -l stacks -d (_ "Profile stack usage") -a 'yes\t"Profile stack usage" no\t"Do not profile stack usage"'
|
||||
|
|
5
share/functions/__fish_print_function_prototypes.fish
Normal file
5
share/functions/__fish_print_function_prototypes.fish
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
function __fish_print_function_prototypes -d "Prints the names of all function prototypes found in the headers in the current directory"
|
||||
cat *.h*|sed -n "s/^\(.*[^[a-zA-Z_0-9]\|\)\([a-zA-Z_][a-zA-Z_0-9]*\) *(.*);.*\$/\2/p"
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user