*! v0.0.1 2017-11-27 Scott Long

// list ado files click to run

capture program drop adoit
program define adoit
    version 13.0
    syntax [ anything] [ , DETails DIRectories DELete hold]

    local adospec : subinstr local anything ".ado" "", all
    if "`adospec'"=="" local adospec "*"

    local adofiles : dir "`c(pwd)'" files "`adospec'.ado"

    display as text " "
    foreach file in `adofiles' {
        local nspaces = 2
        di `"{space `nspaces'}{stata do `file':`file'}"'
    } // file loop

end
exit