Up to now I thought that a semicolon in the shell has (somehow) the same meaning as a line break. So I was surprised that foralias <name>=<replacement text>; <name><name> is unknown while it is known in the next line. csh, tcsh, sh, ksh and bash behave the same. At least for csh it does not matter if alias is used directly or if a script is sourced before the semccolon--the aliases are not known after ; but the are known in the next command line. Is this a bug or is this behavior intended?
New alias not available after ;
shell;alias
The alias syntax you are using is inappropriate for a POSIX shell, for a POSIX shell, you need to use:alias name='replacement'But for all shells, this cannot work as the alias replacement is done early in the parser. Before your alias setup is executed, the whole line was read by the parser and for this reason, your command line wil not work.If the alias appears on the next command line, it will work.