mv
Synopsis
Section titled “Synopsis”mv [args...]Description
Section titled “Description”Wraps mv to automatically collapse nested directories of the same name. When extracting archives results in redundant structures (e.g., themes/themes/), calling mv themes/themes themes will gracefully move the inner contents up one level and remove the empty outer shell.
Also owns the confirmation prompt: it passes -i, so mv asks before overwriting. A flag you pass after it, such as -f or -n, still wins, as it did with the old mv -i alias in conf.d/tricks.fish.
Opinionated component (C1): when disabled via __fish_config_op_aliases or its aliases-tricks sub-category (__fish_config_op_aliases_filesystem), behaves exactly like bare command mv, with no -i.
Arguments
Section titled “Arguments”args... |
Arguments forwarded to standard mv |
Exit Status
Section titled “Exit Status”0 |
Operation succeeded |
>0 |
Standard mv failure, or failed to collapse directory |
Example
Section titled “Example”mv ~/.config/btop/themes/themes ~/.config/btop/themesClassification: bypasses-shadow(mv)