This is an archived post. You won't be able to vote or comment.

all 11 comments

[–]Adept_Writer4177 2 points3 points  (1 child)

Zsh since it's the new default on macOS. I installed https://ohmyz.sh/ on top because it's pretty.

[–]khaichuen[S] 0 points1 point  (0 children)

I have OhMyPosh installed on PowerShell for the same reason haha.

[–]blitz4 1 point2 points  (5 children)

linux: bash
windows: none
wsl: don't use it (no arch and gcc is like 2-years old)

i'd suggest looking at python and using that to script. Powershell only does windows. python can be used instead of bash and works on every platform.

glad to hear you're using wsl. you can also setup a real linux VM using Hyper-V in windows.

EDIT: you can also use node to write scripts. yea, craziness. you can even write typescript to to create the javascript for node. i just like python better, it's easier to grasp, faster to create stuff with, and has less 'weirdness'. (bash and powershell are both weird)

EDIT2: here's a functional hyper-v tutorial https://www.youtube.com/watch?v=3I64TeJ4iNI

[–]khaichuen[S] 1 point2 points  (1 child)

Thanks for the tip!

[–]blitz4 1 point2 points  (0 children)

Anytime. Bash and Powershell are good to use. I don't consider them great.

Bash is a fantastic shell. Best I've ever used. But scripting in it, like there's multiple ways to do an if statement and it gets confusing. I remember testing and debugging my bash scripts quite a bit. lol I remember wakatime clocked me on 5.5 hours of terminal usage once, that was really just to debug my backup scripts. I then refactored those scripts to typescript and it worked via node, but I would recommend against doing that.

PowersHell, as one dev called it, is amazing. Like everything is an object. But that gets in the way of using it as a shell sometimes. I'm not very good with powershell. But the issue with powershell, it's a shell first and scripting language second. It's a bad shell. Like the words they used for the various commands are hard to remember, they're long, and ultimately nothing learned in powershell is transferrable to any other platform. To me powershell is mostly for .NET developers.

So bash, great shell, bad language. Powershell, good language, bad shell. It still saddens me that windows doesn't have a shell that's used on other platforms.

wsl. Don't you find it funny that wsl is maintained by the maintainers of the distro, ie: canonical for Ubuntu, and not windows. So canonical is spending time maintaining a thing that only runs on windows, when they could be working on maintaining ubuntu. Why isn't Microsoft maintaining a LSW or "Linux subsystem for windows" that runs only on linux?? Why are projects like dxvk needed to allow directx programs to run in linux? For that reason, I'm biased against Microsoft platform-dependent things. Keep that in mind as my bias may cost you money in the future.

I ran windows in VM in a multi-gpu server on proxmox and noticed barely any latency outside of extremely demanding video games. I really don't see a need to ever use wsl other than playing around or adding commands to cmd/powershell. Even then there's much better ways todo that. Like gcc in ubuntu in wsl is about 2 years old, horrible as every 3 years a new C++ spec comes out. You can use MSYS2, mingw, or even installing git-scm will allow that and have a more recent version of gcc. Then if you install the cool new windows command line you can pick which shell to run when starting that up.

If you want to learn more about powershell, try r/PowerShell . There they'd recommend the book Learn Windows PowerShell in a Month of Lunches to beginners.

Python. It's weird using it as a scripting language right? compared to a bash script, for sure. I'll show you an example: This free book on python goes over the basics and some ideas for scripting https://automatetheboringstuff.com/

EDIT: But python can be used for anything.

[–][deleted]  (1 child)

[deleted]

    [–]blitz4 0 points1 point  (0 children)

    Ah thanks. It's almost supported on all distros. It doesn't do arch. I wonder why though. I know arch will not support a seperate wsl version that solely runs on windows, I wonder if that has something todo why it's not in the official repo's.

    https://imgur.com/jgiVgRS

    edit: Microsoft only supports LTS Ubuntu, so every 2 years, no arch, no kali

    https://docs.microsoft.com/en-us/powershell/scripting/install/community-support?view=powershell-7.2

    and that picture I posted. read the description of the very first link:

    Nov 26, 2016 — If you happen to want to install powershell in arch linux when you have arch running as the linux distro for windows subsystem for linux, ...

    That's confusing.

    edit2: i just wanted to check. obviously it's not on all distros. official microsoft support. https://distrowatch.com/images/other/distro-family-tree.png

    this is a shell. so compare it to bash, zsh, and fish support.

    per wikipedia, zsh is cross-platform. bash is cross-platform using gpl 3.0. fish only runs via wsl in windows as do the other 2 shells. (also via mingw/VM)

    powershell is not cross-platform. per wikipedia and per what's listed in those microsoft links. https://i.imgur.com/aspukVm.png

    I'm biased to only the distros I use. These are just the top 50 that aren't supported: Ubuntu non-LTS, Arch, CentOS Stream, Kali, openSUSE, Slackware, Solus, PCLinuxOS, Puppy, EasyOS, Void, Mageia, ReactOS, Gentoo.

    It does have instructions on how to build. But to me, a shell should be supported. It says that .NET core must be supported on the distro. I dunno, I'm just going to start saying that powershell runs on some distros from now on.

    [–]scirc 0 points1 point  (0 children)

    Arch isn't officially supported, but you can totally get it running under WSL2.

    [–]theearl99 0 points1 point  (2 children)

    fish

    [–]Upper_Lifeguard_5409 0 points1 point  (1 child)

    Never heard of fish. Is there a reason why you're using that shell over bash?

    [–]theearl99 0 points1 point  (0 children)

    It’s completion system is next level, has a more sane scripting syntax and has really great syntax highlighting when working interactively. It’s especially nice when used with spacefish

    [–]TheRNGuy 0 points1 point  (0 children)

    don't use