Location of functions

bash, function

Solution

To find the file name and line number of a function declaration in bash, use `shopt -s extdebug`:

$ shopt -s extdebug
$ declare -F quote
quote 143 /usr/share/bash-completion/bash_completion

Problem

If I run the `declare` command it returns some functions ``` $ declare -F | grep 'f [^_]' declare -f dequote declare -f quote declare -f quote_readline ``` However if I run this command it does not find any files with that function ``` grep -r dequote /etc ~ ``` How can I find the files that define these functions?

Original source