4 ms·
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 a
by tootie 8y ago
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.
- sdegutis 8y ago`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
- eropple 8y agoPowerShell 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. ;) )
- timvisee 8y agoYet I still can't figure out where to put tab completion files for custom binaries
- eropple 8y agoYou 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.)
- jablan 8y agoWhich Linux shells? I guess most distributions install bash-completion by default, and Home and End keys also work by default.
- fivesixzero 8y agoAs 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.
- koala_man 8y agoDo 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.
- contextfree 8y agoAs 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."
- ridiculous_fish 8y agoRich tab completions is table stakes for Unix shells these days.
- PascLeRasc 8y agoZsh has excellent tab completion and you don't have to write a whole novella for each command like Powershell mandates.
- otterley 8y agoThere'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.
- TheAceOfHearts 8y agoTry 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/ https://fishshell.com/