mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 07:35:43 +08:00

Drops the % notation for process expansion. The existing notation was a mess and expanded jobs, process ids, and process names via dark magic. With this change, % is no longer a special character and can be used unescaped with impunity. The variables %self and %last, referring to fish's own pid and the pid of the last backgrounded job respectively, have been replaced with $pid and $last_pid. These are read-only variables, protected against being redefined by the user. Author's note: I would have personally preferred $fish_pid instead of $pid but since we debated changing $version to $fish_version and then reverted that change (with much acrimony), it makes no sense to break with that precedent here. Additionally, $fish_last_pid is quite wordy. Closes #4230. Closes #1202.