As mentioned several times, an alias probably isn't what you want - use a function.
Just for completeness, though - the problem with your alias is that you are thinking of it as having "arguments". An alias is just a string reparse.
alias path='sed ''s/:/\\n/g'' <<< "$PATH"' becomes
sed s/:/\\n/g <<< "$PATH" when you enter path on the CLI, so
path $FOO becomes
sed s/:/\\n/g <<< "$PATH" $FOO
The I/O redirection still happens, but sed isn't seeing that in its command list.
What it sees is that the command is now
sed s/:/\\n/g $FOO
which tries to open the value of $FOO as a file. If FOO=a:b:c it's looking for a file named a:b:c, and ignoring its stdin entirely.
$: echo $FOO $BAR
a:b:c 1:2:3
$: alias p
alias p='sed s/:/\\n/g <<< "$FOO"'
$: cat $FOO
a:b:c
$: cat $BAR
1:2:3
$: p # reads stdin from the *value* of $FOO
a
b
c
$: p $FOO # reads FILE input from file named $FOO
a
b
c
$: p $BAR # reads file input ONLY from file named $BAR, ignores stdin from $FOO
1
2
3
$: rm $FOO $BAR
$: p # Still reads stdin from value of $FOO
a
b
c
$: p $FOO
sed: can't read a:b:c: No such file or directory
$: p $BAR
sed: can't read 1:2:3: No such file or directory
alias doesn't take arguments, it only sets a string value to be reparsed on the CLI.
Since it makes several passes you can do some interesting things, but if you don't understand what's happening it can cause you grief.
You could define it this way -
$: alias p='sed s/:/\\n/g <<< '
$: p $FOO
a
b
c
$: p $BAR
1
2
3
but I do NOT recommend it. It's fragile.
Use a function, it's a lot more structured and has useful features like arguments.
Consider what might go wrong and include some error handling.
not for >pathXL $PATH -- how to remove leading '$' if it is there?- you can't remove the$from$PATHinsidepathXLas$PATHwould be expanded by your shell beforepathXLis called. Anyway, make sure to just accept an answer to the question you asked, don't add more questions on top of it as then it becomes a chameleon question which is strongly discouraged,$is "off the mark" then you'll need to clarify what you meant bynot for >pathXL $PATH -- how to remove leading '$' if it is there?(in your new question, not here).