News for hackers. Stuff that matters.
Re:Hints for writing Unix tools by lstamour on Monday October 20, 2014 @11:09PM (#8485734)
On Mac (OS NeXT, perhaps?), the convention seems to be that most commands produce human readable output by default, but you can pass a parameter like -x or -xml to get (usually) XML, machine-readable output, and with some tools, -j or -json will give you that format.

But then you've oddities like plutil behaving like gzip by modifying the file you specify rather than printing to stdout. You have to pass -o and a dash to get it to leave the file alone and instead reformat it to stdout. That one gets me every time. And I'm not alone: https://twitter.com/mavcunha/status/417823730505895936

But other parts are nice. For instance, "system_profiler -xml > MyReport.spx" generates XML that will open in the System Profiler GUI app. The XML generated is usually a Plist, since that's as native to the platform as the Registry might be to Windows...

Let me know when PowerShell gets tabs though. Maybe there's a Terminal.app port running in Mono somewhere? Seriously, I wish somebody would build a better terminal, maybe get creative with scrollback and chaining commands, and ship it in an OS... with tabs. ;-)

Re:Hints for writing Unix tools by tfigment on Tuesday October 21, 2014 @12:41AM (#8485923)
Not sure if its what you had in mind for Windows and tabs but I've found ConsoleZ [1] quite nice and allows powershell, cmd and others to have tabs.

[1] https://github.com/cbucher/console

Re:Hints for writing Unix tools by lstamour on Tuesday October 21, 2014 @08:34AM (#8486966)
Yeah, I know it's possible with adding, I've tried Console2 and ConEmu before. But I'd like it to just work out of the box with no extra software, as it does on Mac or Linux. Until Windows 10, that terminal hadn't changed since NT days...
Re:Hints for writing Unix tools by ygra on Tuesday October 21, 2014 @08:46AM (#8487015)
You can use the PowerShell ISE. Which has tabs and you can just hide the script pane to get only the console itself. Startup time is a bit hefty, but if you have tabs you probably create new tabs way more often than the tab container.

Especially for PowerShell the whole problem that Console2, etc. have is trivial, as you have an API to create a host application instead of relying on polling a hidden console window. The console host is just one of those hosts.

Re:Hints for writing Unix tools by emodendroket on Tuesday October 21, 2014 @10:04AM (#8487356)
I'm drawing a blank on the specifics but some things will work in the PowerShell prompt that won't work in the ISE.
Re:Hints for writing Unix tools by ygra on Tuesday October 21, 2014 @10:44AM (#8487577)
Programs that want access to the actual console. E.g. for interactive input, moving the cursor around, etc.
Re:Hints for writing Unix tools by tracker1 on Tuesday October 21, 2014 @01:43AM (#8486088)
I've been digging conemu[1]

[1]: https://code.google.com/p/conemu-maximus5/