diff --git a/plugins/available/base.plugin.bash b/plugins/available/base.plugin.bash index c93ed4e7..6e6d9f84 100644 --- a/plugins/available/base.plugin.bash +++ b/plugins/available/base.plugin.bash @@ -204,3 +204,18 @@ function del() { group 'base' mkdir -p /tmp/.trash && mv "$@" /tmp/.trash; } + +for_all_dirs () +{ + about 'loops through all subdirectories of the current directory and executes the specified command in each of them' + param 'command' + group 'base' + example '$ for_all_dirs svn up' + for dir in */ + do + echo "Processing $dir" + cd "$dir" + $* + cd .. + done +}