But this code only applies to shell aliases if the change is indeed in drush_shell_alias_replace(). Odd that you only want to affect shell alias requests.