I like to make a lot of changes to my $profile file. After saving a change, I would like to source the file using an "sop" alias. Here's how I hope to accomplish that:
set-alias sop Source-Profile
function Source-Profile {
. $profile
}
This function does not throw any errors, so it appears to work. However, when I do make changes to my $profile file, this function doesn’t appear to to anything. I still have to type . $profile
from the PS prompt to re-evaluate that file. And that's ok, but it is a minor pain. I would rather use an alias to source that file.
What am I missing here?