When PS has pushd, popd and dirs -v I’ll switch.
function Set-StackLocation ($Position) {
(gl -Stack).Path | select -Index $Position | cd
}PowerShell leans a bit more towards being a scripting language than an interactive shell, so things are more verbose, as befits a shell script that needs to be read and updated later by a different programmer.
But yeah, lots of little trade offs like that permeate the language.