News for hackers. Stuff that matters.
Re:Introducing nushell by 0x445442 on Saturday August 24, 2019 @10:11AM (#20787205)
Yeah, I tried using Powershell as my shell and that's when I found out Powershell is more about the scripting language than an optimized shell used for everyday use. I was confronted with this almost immediately because one of the things I rely on most in Bash is 'dirs -v', pushd and popd. I have dirs aliased to dirs -v and I usually have 15-20 paths on my stack. I'll leave implementing the same functionality in Powershell as a user exercise.
Re:Introducing nushell by oldmanhorton on Saturday August 24, 2019 @11:36AM (#20787734)
Im confused... Why doesn't Push-Location (aliased to pushd by default), Pop-Location (aliased to popd by default), and Get-Location -Stack (trivially aliasable to dirs) not work? You can even have multiple location stacks and, if you care about the registry, you can also use the same commands to handle registry navigation as well.
Re:Introducing nushell by 0x445442 on Saturday August 24, 2019 @06:39PM (#20790152)
‘dirs -v’ shows an enumerated list of directories. If I follow that up with pushd +11 I will be taken to the 11th path listed in the prior dirs command. As far as I know this isn’t implemented out of the box in PS
Re:Introducing nushell by jen20 on Saturday August 31, 2019 @07:27AM (#20845696)
An addition to `{Push,Pop}-Location` - `Get-Location -Stack` will show the current directory stack. I don't know offhand of a way to get the equivalent of `pushd +11` though.
Re:Introducing nushell by nickcox on Tuesday September 10, 2019 @05:23AM (#20926438)
Not out of the box but I wrote a module[0] that gives you `cd+ 11` (and `dirs -v`).

[0] https://github.com/nickcox/cd-extras#navigate-even-faster