#!/usr/bin/env zsh # YES_ZSH cdbusiest() { ### @- ### cd to the directory with the most files in it, counted recursively. dbusiest | read -r c d [ -z $c ] && return 1 printf "%s\n" "$c $d" cd $d } [ "${SOURCING:-0}" -gt 0 ] || cdbusiest "$@"