News for hackers. Stuff that matters.
Re:Windows gets a new terminal by tootie on Monday May 06, 2019 @12:25PM (#19840896)
PowerShell has been more usable than Linux or OSX shells for quite a while. It has tab completion for not just commands, but flags and arguments. And the home and end keys work.

And every dev I know that has to deal with Windows still uses CMD instead.

Re:Windows gets a new terminal by eropple on Monday May 06, 2019 @12:27PM (#19840937)
PowerShell having standardized tab completion of flags/arguments is really nice, but it's worth noting that both bash and zsh support pluggable completion. It's one's choice of tools, and the lack of completion therein, that's the real sticking point. Home/end work on every machine I own, though I know that some machines (some Macs, specifically) have issues unless they're configured in the terminal emulator.

(I try to use PowerShell when on Windows. I genuinely like it--just kinda wish it was a little easier to write-on-the-fly, it's very verbose and typey and Tab is just far enough away to cause some wrist strain. ;) )

Re:Windows gets a new terminal by timvisee on Monday May 06, 2019 @12:38PM (#19841065)
Yet I still can't figure out where to put tab completion files for custom binaries
Re:Windows gets a new terminal by eropple on Monday May 06, 2019 @03:53PM (#19843107)
You can't? I've never done it but I'm pretty sure I know this: in bash, you can get it from pkg-config. If you aren't using pkg-config, you're kind of swimming upstream in the first place, but CentOS and Fedora (the only distro I use, but I think Ubuntu uses the same) look at /etc/bash_completion.d.

In zsh, it's just $FPATH. Your canonical location can also be gotten from pkg-config.

This seems very googleable. Doubly so if you're doing the right thing and...using pkg-config.

(Please use pkg-config. Thank you for coming to my TED talk.)

Re:Windows gets a new terminal by fivesixzero on Monday May 06, 2019 @12:38PM (#19841068)
As someone that grew up on bash the concepts that underlie PowerShell’s syntax are unnecessary reinventions at their best and utterly bizarre at their worst.

That’s the primary reason my hierarchy of Windows shells usually starts with bash (via WSL, MinGW, or Cygwin) for file management, ssh, compile/build/deploy, and text parsing work and ends at CMD and eventually PowerShell for the Windows services management and other Windows internals that require it.

Also, bash’s (and other similar shells’) high degree of customization is both easily portable and massively extensible. With some minor customization it’s possible to match, or even exceed, PowerShell’s tab completion capabilities.

Re:Windows gets a new terminal by koala_man on Monday May 06, 2019 @01:51PM (#19841939)
Do you have some examples?

I'm very familiar with Bash, but I've never used PowerShell. It doesn't seem like e.g. passing structured data would be a bad thing.

Re:Windows gets a new terminal by contextfree on Monday May 06, 2019 @07:09PM (#19844849)
As someone who's pretty familiar with both bash and PowerShell, I don't consider either of them better or worse than the other, just different. I think of PowerShell as something in between a traditional command-line shell like bash and a scripting language like python, with a mix of the strengths and weaknesses of both. It's not the best of both worlds, nor the worst of both worlds (each of which I've seen comments online arguing), it's just "some of the good and bad of both worlds."
Re:Windows gets a new terminal by TheAceOfHearts on Monday May 06, 2019 @03:20PM (#19842784)
Try fish shell [0]. It's not entirely POSIX compatible, but it's close and it provides the best shell experience I've had. It has sensible defaults so everything works well out of the box

[0] https://fishshell.com/

Re:Windows gets a new terminal by sdegutis on Monday May 06, 2019 @12:27PM (#19840931)
`brew install bash-completion` gives you auto-completion for a huge many number of commands.

Home = Ctrl-A

End = Ctrl-E

Map Caps Lock to Ctrl

Re:Windows gets a new terminal by ridiculous_fish on Monday May 06, 2019 @12:45PM (#19841151)
Rich tab completions is table stakes for Unix shells these days.
Re:Windows gets a new terminal by jablan on Monday May 06, 2019 @12:31PM (#19840988)
Which Linux shells? I guess most distributions install bash-completion by default, and Home and End keys also work by default.
Re:Windows gets a new terminal by PascLeRasc on Monday May 06, 2019 @12:48PM (#19841183)
Zsh has excellent tab completion and you don't have to write a whole novella for each command like Powershell mandates.
Re:Windows gets a new terminal by otterley on Monday May 06, 2019 @03:59PM (#19843172)
There's wisdom in their mandate, though.

Lack of thorough, accurate documentation shipping with modern open-source software is a real problem. While a lot of software written in the 1980s-1990s (GNU project, Solaris, etc.) have fantastic man pages and Info documentation, much that has been written since has been poorly documented, if at all.

Good documentation shows that (a) the author has thought clearly through their work and (b) shows respect for the user's time by not making them experiment or have to delve into the source code, third-party blog posts, etc. to figure out how the software works.