В псевдониме нельзя использовать аргументы. (Вы можете добавлять элементы после него, но это только усложняет ситуацию. )Вот что о них говорится на справочной странице(man bash
):
The first word of each simple command, if unquoted, is checked to see if it has an alias. If so, that word is replaced by the text of the alias. [...]
There is no mechanism for using arguments in the replacement text. If arguments are needed, a shell function should be used. [...]
For almost every purpose, aliases are superseded by shell functions.
Итак, вместо псевдонима следует использовать функцию.
rp() { rename "s{$1}{}" *; } # No "{}" characters in the substitution
Использование
rp 'the.' # Quotes optional but recommended. Remember. represents any character