If symbolic link
bar points to folder
foo, then the two following commands have very different behaviors:
mv bar baz # rename link 'bar' to 'baz' mv bar/ baz # rename folder 'foo' to 'baz'
(tried with bash 3.2 and zsh 5.7.1 on OSX).
I find the second behavior very dangerous (especially given that "tab" usually completes folder names with a trailing slash), and would like to prevent it if possible. The manual of
mv doesn't seem to have an option for that. Short of aliasing
mv with my own function, is there maybe a Bash option or zsh option, or something else, that would help with this issue?