mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-27 03:13:37 +08:00
Move __fish_print_function_prototypes into valgrind completion script
This commit is contained in:
parent
013001c283
commit
69dccce937
|
@ -72,6 +72,13 @@ complete -n "__fish_valgrind_skin cachegrind" -xc valgrind -l D1 -d "Type of L1
|
|||
complete -n "__fish_valgrind_skin cachegrind" -xc valgrind -l L2 -d "Type of L2 cache"
|
||||
|
||||
|
||||
function __fish_print_function_prototypes -d "Prints the names of all function prototypes found in the headers in the current directory"
|
||||
set -l headers *.h *.hh *.hpp *.hxx
|
||||
if set -q headers[1]
|
||||
sed -n "s/^\(.*[^[a-zA-Z_0-9]\|\)\([a-zA-Z_][a-zA-Z_0-9]*\) *(.*);.*\$/\2/p" $headers
|
||||
end
|
||||
end
|
||||
|
||||
# Massif-specific options
|
||||
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"'
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
|
||||
function __fish_print_function_prototypes -d "Prints the names of all function prototypes found in the headers in the current directory"
|
||||
set -l headers *.h *.hh *.hpp *.hxx
|
||||
if set -q headers[1]
|
||||
sed -n "s/^\(.*[^[a-zA-Z_0-9]\|\)\([a-zA-Z_][a-zA-Z_0-9]*\) *(.*);.*\$/\2/p" $headers
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user