shell-common: move _add_dir_shortcut to shell-common for others to use