zsh:alias: Add TODO note to fragile rm condition
This commit is contained in:
@@ -177,6 +177,8 @@ fi
|
|||||||
add_flags mv -i
|
add_flags mv -i
|
||||||
# Only add flags if rm is not aliased to a different command (e.g. trash).
|
# Only add flags if rm is not aliased to a different command (e.g. trash).
|
||||||
# NOTE: This also works if rm is not yet aliased.
|
# NOTE: This also works if rm is not yet aliased.
|
||||||
|
# TODO: This breaks for a single word alias containing the substring `rm`,
|
||||||
|
# as then there is no word splitting anymore.
|
||||||
(( ${${aliases[rm]}[(ei)rm]} > ${#${aliases[rm]}} )) ||
|
(( ${${aliases[rm]}[(ei)rm]} > ${#${aliases[rm]}} )) ||
|
||||||
add_flags rm -I
|
add_flags rm -I
|
||||||
add_flags mkdir -p
|
add_flags mkdir -p
|
||||||
|
|||||||
Reference in New Issue
Block a user