Skip to content
Snippets Groups Projects
Commit 8b8b9da4 authored by Jani Nikula's avatar Jani Nikula
Browse files

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: default avatarJani Nikula <jani.nikula@intel.com>
parent 9fc81541
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment