I am using oh-my-zsh. I have both the following two aliases about rm
command get sourced:
alias rm='rm -i'
function clean_tex_mid_file()
{
rm -f *.dvi *.log *.synctex.gz *.aux
}
alias cleantex='clean_tex_mid_file'
And I found that when I tried to remove files not exist using cleantex
defined above, it complained like 'no matches found: *.dvi'
, ignoring the -f
option.
A deeper test shows bash will keep silent trying to delete files not exist, sourcing the same alias file.
So how to handle this problem and what happened behind?