Re:“Why I develop on Windows”
by newprint on Friday April 28, 2023 @06:41PM
(#35748046)
After 3 decades working on Windows, I recently got into Linux and stared learning bash through "The Linux Command Line, 5th ed." book and watching youtube videos.
Powershell is so much nicer and a lot more productive to work with compared to bash. Unlike the bash commands that returns strings, Powershell commands return objects. Working in any OOP language and Powershell feels very natural.
[ Parent
| on HN ]
Re:“Why I develop on Windows”
by cyberbanjo on Friday April 28, 2023 @06:49PM
(#35748114)
Just to corroborate from the opposite direction, I have run exclusively Linux on my personal machines for nearly a decade, and I started a new job where I get to use PowerShell, and it's really amazing, the amount of grep/tail/head (or Get-ChildItem/Select -First/-Last) I have to do is so much less, it feels so much less klunky. Probably the only thing I don't like more so far is Get-Help, because it doesnt put you into a pager with search, it just dumps to text. EDIT: apparently I need Help not Get-Help for paging
EDIT2: and I hate that PowerShell doesn't support readline/emacs keybindings
I thought the PSReadline module had some of that but then it might be a "nearly" compatible experience which can be really jarring when you hit the edge cases.
Re:“Why I develop on Windows”
by cyberbanjo on Saturday April 29, 2023 @03:54PM
(#35756530)
Maybe I just didn't have enabled, thanks for reminding me, seems good enough for me
What’s the dirs -v, pushd and popd equivalent in PS?
Re:“Why I develop on Windows”
by cyberbanjo on Friday April 28, 2023 @07:37PM
(#35748499)
popd and pushd are aliases for Pop-Location and Push-Location, so they are the PowerShell equivalent. Unsure about dir -v.
dir itself is an alias for Get-ChildItem, but I don't know about -v (natural sort of version number)
dirs -v presents a numbered stack of directories. Pushd doesn’t just function on one directory but also takes in a number pointing to a directory on the stack. Nothing like this exists out of the box for PS and it’s one of the most productive features in Bash.
Re:“Why I develop on Windows”
by shortrounddev on Friday April 28, 2023 @07:26PM
(#35748421)
What do those do
Re:“Why I develop on Windows”
by metaltyphoon on Saturday April 29, 2023 @08:12AM
(#35752175)
Keep a stack of dirs where u can jump very quickly into.