I can't believe I've never run into this before...
I've had this in my .bash_profile for *years*
alias mmv='echo "" ; echo "DON'\''T GET COCKY! mv -i set in .bash_profile, this is NOT default. " ; echo " Default is to overwrite WITHOUT PROMPTING" ; echo "" ; /bin/mv -i'
Now I did:
diff file1 file2 && mmv file1 otherDir
-----------
Now, apparently, 'alias' doesn't act like a script or a function, as I'd long-understood.
Apparently it literally just pastes the contents on the line... so what I'm getting, instead is essentially:
diff file1 file2 && echo "" ; ..... ; mv file1 otherDir
I have a *really* hard time believing I never ran into this before. REALLY hard time. Literally *years* I've used this alias... and never *once* ran into this?! But, that's the claim.
So, those ';'s need to be replaced with '&&'.
-----------
And upon looking at the alias with fresh eyes, I should've seen that it wasn't treated like a function... since it's not using arguments...
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.