News for hackers. Stuff that matters.
Re:Apple makes zsh default shell on macOS by sarah180 on Wednesday June 05, 2019 @04:39AM (#20102508)
PowerShell is available for Linux & Mac now if you're looking for a structured, object-oriented shell on your Mac.
Re:Apple makes zsh default shell on macOS by robin_reala on Wednesday June 05, 2019 @04:44AM (#20102530)
Doesn’t really fit into the posix compatibility bucket though. If that hadn’t had been a concern then I imagine fish is the most Mac-like shell out there.
Re:Apple makes zsh default shell on macOS by nailer on Wednesday June 05, 2019 @05:10AM (#20102633)
I'm not sure how much POSIX matters anymore. Linux and MacOS determine 'standard' Unix behavior by their market share - I can understand disliking this though.
Re:Apple makes zsh default shell on macOS by ChrisSD on Wednesday June 05, 2019 @04:49AM (#20102554)
The issue I have with Powershell is it's full on objected oriented. Personally I'd like something in between. Structured data where the "methods" are the utilities themselves.
Re:Apple makes zsh default shell on macOS by nailer on Wednesday June 05, 2019 @05:07AM (#20102624)
Most of the time (though not always) the methods are the utilities. From https://github.com/mikemaccana/powershell-profile/#how-does-...

    $results = @{} 
    ls -recurse -filter "eslint-scope" | foreach { 
        $file = "${PSItem}\package.json" 
        $version = cat $file | convertfrom-json | select -ExpandProperty version 
        $results.Add($file,$version) } 
    echo $results | format-list
You don't have to pipe to 'select', 'where' etc - if you send something to grep or select-string you'll be looking for regexs bash-style.