-
- Downloads
dim: handle subcommands through functions
If there's a dim_ prefixed function matching the subcommand, call it to
handle the subcommand without going through the big switch case.
Drop the cases which already match the convention. Once all the cases
are converted to functions, the handling of subcommands becomes much
cleaner.
This also allows extending of dim by the user via functions declared
outside of dim. The current aliases could also be made the user's
responsibility to define as the user wishes (the user could define dim_
prefixed functions in the dimrc).
Signed-off-by:
Jani Nikula <jani.nikula@intel.com>
Loading
Please register or sign in to comment