Tbpgr Blog

Employee Experience Engineer tbpgr(てぃーびー) のブログ

bash | 定義済み関数の確認

概要

定義済み関数の確認

詳細

定義済み関数の確認は以下のコマンドで行います。

declare -f

サンプル

$ declare -f | head
_ImageMagick () 
{ 
    local cur prev;
    _get_comp_words_by_ref cur prev;
    case $prev in 
        -channel)
            COMPREPLY=($( compgen -W 'Red Green Blue Opacity \
                Matte Cyan Magenta Yellow Black' -- "$cur" ));
            return 0
        ;;