fix(mv): bring header and completions up to repo conventions
The EXIT STATUS block used a single space before the ">0" row's description, which falls below the doc pipeline's 2-space column threshold and silently degrades the rendered site page from a table (like rm's) to a plain indented block. Pad it to match. Also strip trailing whitespace from two DESCRIPTION lines and add --wraps='mv' so fish inherits real mv's completions, matching the bash/top wrapper convention.
This commit is contained in:
+5
-5
@@ -9,8 +9,8 @@
|
|||||||
#
|
#
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
# Wraps mv to automatically collapse nested directories of the same name.
|
# Wraps mv to automatically collapse nested directories of the same name.
|
||||||
# When extracting archives results in redundant structures (e.g.,
|
# When extracting archives results in redundant structures (e.g.,
|
||||||
# themes/themes/), calling `mv themes/themes themes` will gracefully
|
# themes/themes/), calling `mv themes/themes themes` will gracefully
|
||||||
# move the inner contents up one level and remove the empty outer shell.
|
# move the inner contents up one level and remove the empty outer shell.
|
||||||
#
|
#
|
||||||
# Opinionated component (C1): when disabled via __fish_config_op_aliases,
|
# Opinionated component (C1): when disabled via __fish_config_op_aliases,
|
||||||
@@ -20,12 +20,12 @@
|
|||||||
# args... Arguments forwarded to standard mv
|
# args... Arguments forwarded to standard mv
|
||||||
#
|
#
|
||||||
# EXIT STATUS
|
# EXIT STATUS
|
||||||
# 0 Operation succeeded
|
# 0 Operation succeeded
|
||||||
# >0 Standard mv failure, or failed to collapse directory
|
# >0 Standard mv failure, or failed to collapse directory
|
||||||
#
|
#
|
||||||
# EXAMPLE
|
# EXAMPLE
|
||||||
# mv ~/.config/btop/themes/themes ~/.config/btop/themes
|
# mv ~/.config/btop/themes/themes ~/.config/btop/themes
|
||||||
function mv --description 'Move files with auto-collapse for nested directories'
|
function mv --wraps='mv' --description 'Move files with auto-collapse for nested directories'
|
||||||
# Opinionated guard (C1): fall back to bare command mv when disabled.
|
# Opinionated guard (C1): fall back to bare command mv when disabled.
|
||||||
if not __fish_config_op_enabled __fish_config_op_aliases
|
if not __fish_config_op_enabled __fish_config_op_aliases
|
||||||
command mv $argv
|
command mv $argv
|
||||||
|
|||||||
Reference in New Issue
Block a user