zsh:alias: Add TODO note to fragile rm condition

This commit is contained in:
2024-05-12 21:00:12 +02:00
parent f000b53882
commit ec4bb20625

View File

@@ -177,6 +177,8 @@ fi
add_flags mv -i
# 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.
# 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]}} )) ||
add_flags rm -I
add_flags mkdir -p