ucodery, to windows
@ucodery@fosstodon.org avatar

OH: If cmd is Windows’ sh then powershell is its fish
#Windows #PowerShell #FishShell #POSIX

publicvoit, to programming
@publicvoit@graz.social avatar

What happens, when you join two paths in a language when the second one is an absolute one?

join("foo", "/bar")
returns "foo/bar" or "/bar"?

The wonderful @meisterluk wrote a great article about that you might want to read: https://lukas-prokop.at/articles/2024-05-03-filepath-join-behavior

I can not tell what version I'd actually prefer. There are situations where both versions would be "proper".

#C++

cjerrington, to Powershell
@cjerrington@mstdn.social avatar

Figured out how to get the X day of the week in recently. I needed to know what the 1st,2nd,3rd, etc Friday of the month is, and proceed accordingly.

You can also easily find what the 2nd Tuesday of the month is as well! Options are endless.

https://claytonerrington.com/blog/finding-specific-day-of-the-month/

royal, to python
@royal@theres.life avatar

I think in PowerShell and can manage in Python. I want to learn Rust to the degree I can write in it directly, rather than prototyping in PowerShell and then converting.

A lot of what I do is data manipulation and analysis. (Take several CSV files as input, and output new CSV files that answer business questions based on the inputs.) I'm seriously impressed with Rust's performance here.

If you've made this transition, advice on where to begin?

JeffHicks, to Powershell
@JeffHicks@techhub.social avatar

If you are a user, you should provide your feedback on open issues. Don't let a few people decide the future. I also encourage you to get involved with Discussions. https://github.com/PowerShell/PowerShell/issues

kohelet, to Powershell
@kohelet@mstdn.social avatar

I use PowerShell, BTW.
petition to make this the new high scosiety sentence, like the using arch btw one.

You just have to admit, PowerShell is way supririour (hu) to Bash and it's wrappers,
and people who have realized that and moved to using PS (on linux) are just better and smarter.

I'm gonna add a digital signiture to all my messages "I use PowerShell, BTE" regardless of context, destination, and if I really used powershell to send this message.

mdowst, to Powershell
@mdowst@mastodon.social avatar

Weekly for April 26, 2024 is out now! https://psweekly.dowst.dev/?p=6806

0xSim, to rust
@0xSim@hachyderm.io avatar

Love , 8GB of dependencies to build a 2.8MB executable :|

0xSim,
@0xSim@hachyderm.io avatar
ciphertxt, to azure
@ciphertxt@mastodon.social avatar

Sometimes it's good to keep up with previews. We recently released the latest version of the module for . This release brings several changes for interactions with Queues as we transition from a legacy data plane SDK to our modern data plane SDK (details in https://github.com/Azure/azure-powershell-pr/issues/3261).

You can find the latest preview module on the PowerShell Gallery at https://www.powershellgallery.com/packages/Az.Storage/6.1.4-preview

ITeeTechMonkey, to python
@ITeeTechMonkey@mastodon.social avatar

I rewrote a Powershell script in Python for my teammates who use Macbooks.

Now I still love writing scripts in Python, but to say I've been spoiled by Powershell is a massive understatement.

#python #sysadmin #powershell #automation

leanpub, to Powershell
@leanpub@mastodon.social avatar

The PowerShell Practice Primer: 100+ Exercises for Improving Your PowerShell Skills https://leanpub.com/psprimer by Jeff Hicks is the featured book on the Leanpub homepage! https://leanpub.com #PowerShell #Software

jaykul, to Powershell

What that you wrote do you actually use most regularly, like, on a basis?

I'm going to have to say my prompt stuff, since not a day goes by where I'm not staring at the output 😉

But also ... Get-Parameter, which I use so often that I sometimes forget it's not built-in.

https://github.com/Jaykul/TerminalBlocks

https://github.com/Jaykul/PowerLine

https://www.powershellgallery.com/packages/Get-Parameter

kohelet, to fedora
@kohelet@mstdn.social avatar

I love my new setup (Fedora and KDE plasma)
It all feels so nice and clean. and new.
And smooth.

Too bad I'm only gonna use it once a week :(

Oh, and Powershell. I love powershell.
It's my default shell now.

JeffHicks, to Powershell
@JeffHicks@techhub.social avatar

My monthly grab bag of goodies is freely available to everyone. Although I hope you'll consider becoming a premium subscriber. https://buttondown.email/behind-the-powershell-pipeline/archive/powershell-potluck-march-2024/

zirias, to windows
@zirias@techhub.social avatar

Goal: Get some #letsencrypt certificate obtained with #uacme deployed on some #Windows box

Step 1: Ok, this probably works best with #Powershell (which I don't really like ...)

Step 2: There's no #FreeBSD port ... but hey, there's now a FreeBSD port of #dotnet, let's try to "just" build Powershell using that.

Step 3: Hell why does it fail to build. Oh, System.Security.Cryptography.Native doesn't play well with #LibreSSL

Patch and retry, I guess I'll take some sleep now first. Bah!

(there's some irony in running into OpenSSL/LibreSSL issues when trying to deploy TLS certificates ...)

zirias,
@zirias@techhub.social avatar

I guess that's progress ... some on at least starting up. Creating a out of this will be a lot of work 😞 had to patch quite some code, e.g. completely disable the "login shell" functionality, the implementations only work on either or ....

And the whole build system fails completely if not built from within a working copy ... WTF? This will be another challenge for porting.

Ah, this messy version is probably a result of the mess in the upstream repo, a tag v7.4.1 exists, but refers to a commit that is gone.

Oh what did I expect ... 😂

zirias,
@zirias@techhub.social avatar

This will be though.

Well, I can certainly build for now. I might be able to just "fake" a working copy for its stupid build system. This still doesn't fully solve the version issue, it insists on appending the git hash -> TODO.

The "login shell" feature can be added, an exercise left for later, the code will look pretty similar to the existing MacOS-X implementation. Maybe upstream would even accept it 😎

For a , it should probably be "published" as "" (I hope this has no negative impact), otherwise lang/dotnet would become a hard run dependency ... This works now as well, but requires changes in lang/dotnet ... requires some platform-specific packages that don't exist on MS servers for FreeBSD. They are created during build of dotnet itself, but not installed anywhere by default ... I'll suggest an "on by default" port option to bundle these with lang/dotnet.

[…]

zirias,
@zirias@techhub.social avatar

A working #FreeBSD #port of #Microsoft #PowerShell is certainly getting closer 😉

zirias,
@zirias@techhub.social avatar

And now, "staging" and packaging for works as well 😎

But this is just the "base" with no bundled modules. Next step, find out how to build and bundle some "essential" Modules, e.g. and/or (for Install-Module), and (for sane commandline editing and stuff) ... any more that absolutely NEED to be bundled? 🤔

zirias,
@zirias@techhub.social avatar

Next "milestone", bundling modules with the package (using the nupkg files available from powershellgallery) works! 🥳

One little thing missing, some of these are auto-imported, others are not ... why? 🤔

Edit: They are auto-imported as soon as you invoke a commandlet ... nice! 😎

Ok, time to commit to my local branch of ports. Can't go to main yet because building still requires some patches to lang/dotnet ...

zirias,
@zirias@techhub.social avatar

In case you want to test #PowerShell on #FreeBSD NOW ... here's a patch for #ports:
https://people.freebsd.org/~zirias/patches/0001-shells-powershell-Add-new-port.patch

It currently requires at least these patches applied before:
https://reviews.freebsd.org/D44560
https://reviews.freebsd.org/D44561

Note they will probably change, the maintainer of lang/dotnet is looking for better options to solve these issues.

cjerrington, to Powershell
@cjerrington@mstdn.social avatar

I need some help with where we need to export some values all as strings. So the numbers we have in the object need to be strings, but only are exported as integers.

Example:
{
"SchemaVersion": 1
}

Needs to be

{
"SchemaVersion": "1"
}

Clatent, to Powershell
@Clatent@techhub.social avatar

One-Ljner Wednesday! What is your current favorite one-liner? Bonus points for one-liners that would be helpful to someone getting into PowerShell

fabian, (edited ) to programming
@fabian@floss.social avatar

For all you fancy command line prompt-havers. Newline or no newline at the end of the prompt?

So, this:

you@host ~/f/bar git:main [*?]␤  
> ▁  

Or this:

user@host ~/f/bar git:main [*?] > ▁  

kohelet, to Powershell
@kohelet@mstdn.social avatar

Why in powershell backtick (`) is the escaping character, and not backslash () like in most languages?
anyone knows?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • Leos
  • Durango
  • magazineikmin
  • Youngstown
  • mdbf
  • rosin
  • slotface
  • thenastyranch
  • InstantRegret
  • PowerRangers
  • kavyap
  • vwfavf
  • tsrsr
  • DreamBathrooms
  • anitta
  • everett
  • GTA5RPClips
  • cisconetworking
  • tacticalgear
  • ngwrru68w68
  • khanakhh
  • ethstaker
  • cubers
  • normalnudes
  • tester
  • osvaldo12
  • modclub
  • provamag3
  • All magazines