Why don't Sup Forums use this? What's wrong with it? I actually kind of like it

Why don't Sup Forums use this? What's wrong with it? I actually kind of like it.

Other urls found in this thread:

frippery.org/busybox/
github.com/koalaman/shellcheck.
zsh.sourceforge.net/FAQ/zshfaq02.html#l14
twitter.com/NSFWRedditImage

It's great for doing shit on Windows. I do about 0 things on Windows these days, except have it run SSH shells and developer tools.

No matter how neato PS is, I have no use for it.

I use it for the default app deletion thing and nothing else, I haven't ran into anything else that'd require powershell. CMD and Windows bash do the things I need just fine.

The only reason PowerShell is so highly praised is because it's the only program if its kind that actually works well, even though it and all of its cousins are objectively garbage. My personal problem with PowerShell is its insanely unreasonable amount of verbosity when it comes to arguments and commands.

on win I use cmder
among other things it maps the shorter bash commands to the powershell equivalent
it's pretty comfy

I've never tried cmder, but I also don't use Windows as my main OS at home. At work I use PowerShell though. There's no reason to use cmd anymore for one.

>unreasonable amount of verbosity when it comes to arguments and commands.
/thread

at least for me

frippery.org/busybox/

>only program if its kind that actually works well
Sooooo...Microsoft did something good at least once?

It's too hard for idiots to use, it is the most powerful and feature-rich shell in existence.

No irssi like IRC client.

Why should I use powershell instead of zsh?

christ you can smell the pajeet shills in this thread

Might as well just use C# at that point

>What's wrong with it?

It's not bash.

text streams are the best and there's nothing you can do about it.

>zsh
Why not bash? I mean what is the point? But I guess you don't have to write script at your job to be executable on different machines. But seriously what's wrong with bash that zsh does better?

Git autocompletion alone is worth it.

>But I guess you don't have to write script at your job to be executable on different machines.
Nigger, zsh is compatible with bash. Just write POSIX-compliant scripts and doesn't matter.

Makes it pretty easy to learn if you don't have much of a programming background. It did for me at least.

how do I know if it is POSIX compliant where can I find the guide or reference? And proof for zsh-bash compatibility?

Just prefix the script with #!/bin/sh and if it fails to run, then it isn't POSIX compliant. There's also various tools you can use like github.com/koalaman/shellcheck.

As for zsh-bash compatibility, the shell syntax is barely different. There's some minor things, but if you really care about compatibility, you should be writing for sh compliance anyway.
zsh.sourceforge.net/FAQ/zshfaq02.html#l14

Thanks. People like you are reason why I still visit Sup Forums.

I rarely need powershell.

Batch suffices in most cases, if not then a C# is a better option – do it once and do it right.

Anyway, I use powershell to sterilize dates.

$now = Get-Date
Get-ChildItem -Recurse -Force | ForEach-Object {
$_.CreationTime = $now
$_.LastWriteTime = $now
$_.LastAccessTime = $now
}

MSBuild invoking is also best done in powershell.

$device = [System.Environment]::ExpandEnvironmentVariables("%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe")

if (-Not [System.IO.File]::Exists($device))
{
Write-Host "Device not found."
Exit
}

ForEach ($item in (Get-ChildItem -Filter "*.sln" -Attributes "!d"))
{
& cmd /c "$device" "$item" /t:Clean`;Rebuild /p:BuildProjectReferences=False /p:Configuration=Release
}

You would only use PowerShell in two places:
-In your job
-On a Windows PC that you bought with your own money

That automatically rules out everyone on Sup Forums. Also, the commands are too long. It's probably good if you're a Windows server administrator, but how many of those are there?

>Not using superior JPSoft Take Command Console (TCC).
>

>paying for FUCKING SHELL

>but how many of those are there?

more than linux admins thats for sure

>paying for it.

They're basically different things.

zsh is an interactive shell that happens to also be a scripting language
powershell is a scripting tool with a shitty interactive shell glued on

I pity anyone who prefers Lunix syntacticool madness over Windows' common sense.

And I REALLY pity anyone whose salary depends on Linux – you're so fucked.

0/10

Powershell ISE is a scripting tool, not powershell.

Powershell is a script host.

...

If you're using a shell, you're not using windows.

please use the same definition of 'shell' as everyone else

what is everyone's else's definition of a shell?

Piping objects is better than piping strings.

Why?

-> >Git autocompletion alone is worth it.
bash also supports autocompletion

one that includes graphical shells like the windows shell that you use when you use windows

That's right, it's not bait. It's an irrefutable truth; Linux is a hobbyist project gone wrong by milllions of SLOC, a
technological blackhole, a predatory blight lurking for virgin blood. Each Linux programmer is the same, a demented loser who became enthralled by a meme OS.

>bash also supports autocompletion
I actually didn't know that although you do have to download a script for it. Zsh comes with a lot of other neat features though like cycling through possible completions with tab. Also browsing through history is a lot better since you can just type part of a command, and then cycle backwards to see what variants of that command you have run.

Linux is the last bastion of freedom. Without it we would have been already living in orwellian dystopia where everything we do is watched over some corporation.

>Also browsing through history is a lot better since you can just type part of a command
ctrl+r in bash. if anything, I find the zsh behavior annoying
did you even try learning how to use bash before claiming zsh is better?

I had my first experience with a neat powershell script when one of my clients needed to sync stock with his website from his ERP. I wrote a 3 line powershell script that did exactly that. I liked it very much.

No, that's *BSD.

ctrl+r isn't the same thing though. I might not remember enough syntax to auto complete what I want.

No, because I can use words however I want. A "graphical shell" is a DE, but If I wanted to specify a graphical shell, I would've said a graphical shell. Stop nitpicking.

>No, because I can use words however I want.
not if you want to communicate

If that's the only thing you can nitpick then you're being picky over nothing

you're a genius

(my definition of genius is moron)

Is there any way to just double-click and run a PowerShell script? Or can I make it executable, place it in PATH and execute it from anywhere?

AFAIK I have to create another .bat file that'll run the PowerShell file. That's downer for me.

*BSD sucks on desktop. Which makes me a bit sad. But *BSD probably has no benefits over Linux except that it is "true" Unix (yes I know it is not really certified).

>AFAIK I have to create another .bat file that'll run the PowerShell file. That's downer for me.

This is better actually, if the script remains in the same directory.

Otherwise save this as a reg file:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell]
@="Open"

That's the contrast between my statement and yours. I didn't need parenthesis because you knew exactly what I was talking about. You needed them because in order to prove your non-point, you needed to explain what "genius" meant to you. My terminology of the world doesn't need an explanation because someone like you can make sense of it without knowing the word I "should've" used. Two questions:

1. Do languages have specific rules that MUST be followed at all times
and
2. What was the word that my inferior intellect should've used?

yea dude piping a whole class is much more efficient than piping an 8 bit string
>wow so fast

>Or can I make it executable, place it in PATH and execute it from anywhere
Windows doesn't invoke PS1 files through the path variable. You need to make shortcut in the same directory, then execute it with Windows Key+R.

Better?!

$ vim bin/doshit
$ chmod +x bin/doshit


I'm used to making simple throwaway scripts. There's nothing good in maintaining special runners for each.

And that's where PS is still shit.

Thanks for the registry hack. I don't have much hopes but I'll try that.

It's a security precaution. Any path-registered powershell script can wreck your system, depending on what it does.

Anyone who has a salary has it dependent on linux.
You think those computers run windows? kek

>You think those computers run windows? kek
Nice meme faggot.

Oh I see. Hopefully those .bat and .exe files can't harm your system.

I didn't know what you were talking about. You wrote a nonsense sentence.

>If you're using a shell, you're not using windows.
>If you're using the windows shell, you're not using windows.
>If you're using windows, you're not using windows.

If you meant to say "If you're using a command line shell, you're not using windows" then a) you should have fucking said that and b) you're wrong.

I use powershell - its great to have a useful shell script for windows. Solid concept but their execution has a couple problems:

Dynamic variable scoping (rather than lexical like every sensible language)

Remoting is a PITA with so many 'security' features, eg arbitrary restrictions around when/how to create remote sessions. Domain vs non-domain, ssl vs plain connection, trustedhosts, etc.

>My personal problem with PowerShell is its insanely unreasonable amount of verbosity when it comes to arguments and commands.
You can sort of fix that by using aliases and only typing what you need. For example, you can shorten
Get-ChildItem -Attributes !Directory

to
gci -at !d

Of course it's not as nice as a shell designed for economy of keystrokes.

>My personal problem with PowerShell is its insanely unreasonable amount of verbosity when it comes to arguments and commands.

>brainlet short-term memory

>powershell is so cool, I love windows!
Some time ago...
>Linux is shit! You have to use a terminal to do things!!! It's stuck in the past!

Absolute state of winfags. Please, do not breed.

>My personal problem with PowerShell is its insanely unreasonable amount of verbosity when it comes to arguments and commands.

Thats why I love it.

It's okay when GaymeOS does it. Everyone else is shit. (Because no games.)

Did I mention video games?

OK, so you just don't know what shells are. Or you're just fucking with me

a shell is not the same as powershell aka. "the windows shell"

a shell, in tech terms is a program that is used to enter commands to the OS. Usually, it's used to execute programs. Common shells include:
bash
zsh
powershell

When I said "if you're using a shell, you're not using windows" I was making the statement that those who use shells likely don't use windows anyway, but probably use Linux or BSD. Of which, usually use bash.

holy fuck

a gui shell is still a shell
the windows shell is not powershell it is the guis shell with the start menu and my computer and so on
powershell is a different shell to the windows shell just like zsh is different the gnome shell

>a shell, in tech terms is a program that is used to enter commands to the OS. Usually, it's used to execute programs.

A shell can furnish any API, doesn't need to be the OS.

A shell doesn't even need an I/O system, it could be an alternative API.

>A shell doesn't even need an I/O system, it could be an alternative API.
e.g. a shell can be superseded by another shell.

>e.g. a shell can be superseded by another shell.
User32.dll is an example of a shell that is used by another shell, Windows Explorer.

How can I learn to use this thing and would it be fun/interesting/useful?

>User32.dll
Mostly shell32.dll

Create a Hijackthis application (collect and format system info).

>Sup Forums is one person
kys my boi I always loved Windows but Linux too. Only braindead brainlets and edgy contrarian faggots have to "hate" something.

Just internet. docs.microsoft.com and msdn. It is very useful if you are a winfag who isn't afraid of command line and realises its advantages over gui.

>kys my boi
I'm not going to kiss your boy, I'm not gay.

What are its advantages over gui?
I'm an amateur.