PowerShell

Discuss anything related to command line tools here.
Post Reply
Message
Author
User avatar
vevy
Posts: 795
Joined: Tue Sep 10, 2019 11:17 am

PowerShell

#1 Post by vevy »

How does it fit in this whole thing?
vevy wrote: Thu Nov 12, 2020 2:53 am I am on the fence when it comes to PowerShell. It is technically a shell, and for the command line. But on the other hand, it is pretty much a language. And it does so much and exposes so many API functions that I am not sure how we can fit that in the current paradigm. Like, would you create an entry for each function it can do, or would we create a massive entry for everything?

I am thinking about just adding it as an "alternative shell" and leave it at that. Just to remind the user that it is an option.

I want to hear people's thoughts.

User avatar
SYSTEM
Posts: 2041
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

Re: PowerShell

#2 Post by SYSTEM »

I'd prefer one entry for PowerShell. Not a fan of having an entry for every command: IMO they'd add little value, like Andrew has said before.
My YouTube channel | Release date of my 13th playlist: August 24, 2020

User avatar
vevy
Posts: 795
Joined: Tue Sep 10, 2019 11:17 am

Re: PowerShell

#3 Post by vevy »

SYSTEM wrote: Thu Nov 12, 2020 5:22 am I'd prefer one entry for PowerShell. Not a fan of having an entry for every command: IMO they'd add little value, like Andrew has said before.
:? I only add entries for subcommands of tools that gather disparate functions under one executable. Think BusyBox or Swiss File Knife (hash a file, find a string in text, hexdump, download files, etc). These are unrelated "tools" gathered together to replace other standalone tools for convenience and size, not because they are related.

FFmpeg has a gazillion functions, but they are all have a theme, so the tool gets only one entry.

billon
Posts: 843
Joined: Sat Jun 23, 2012 4:28 pm

Re: PowerShell

#4 Post by billon »

vevy wrote: Entry for PowerShell
What's next? Entry for CMD.exe? Entries for Paint, WordPad and Notepad?
It's built-in Windows program, what are you even talking about?

User avatar
vevy
Posts: 795
Joined: Tue Sep 10, 2019 11:17 am

Re: PowerShell

#5 Post by vevy »

billon wrote: Thu Nov 12, 2020 1:48 pm
vevy wrote: Entry for PowerShell
Entry for CMD.exe? Entries for Paint, WordPad and Notepad?
In order: maybe, no, no, no.

Windows has dozens of internal tools and commands. A lot of people prefer to use the built-in Windows solution if there is one.

I think they have a comfortable place in a DB of available CLI tools.

User avatar
SYSTEM
Posts: 2041
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

Re: PowerShell

#6 Post by SYSTEM »

billon wrote: Thu Nov 12, 2020 1:48 pm What's next? Entry for CMD.exe? Entries for Paint, WordPad and Notepad?
It's built-in Windows program, what are you even talking about?
Yes and no.

An old version of PS ships with Windows.

The newer version (formerly called PowerShell Core) doesn't, and needs to be manually installed if you want it. (And it's also available for Linux and macOS.)
My YouTube channel | Release date of my 13th playlist: August 24, 2020

Specular
Posts: 443
Joined: Sun Feb 16, 2014 10:54 pm

Re: PowerShell

#7 Post by Specular »

vevy wrote: Thu Nov 12, 2020 5:32 am
SYSTEM wrote: Thu Nov 12, 2020 5:22 am I'd prefer one entry for PowerShell. Not a fan of having an entry for every command: IMO they'd add little value, like Andrew has said before.
:? I only add entries for subcommands of tools that gather disparate functions under one executable. Think BusyBox or Swiss File Knife (hash a file, find a string in text, hexdump, download files, etc). These are unrelated "tools" gathered together to replace other standalone tools for convenience and size, not because they are related.
You've added multiple entries for individual functions of single programs on the CLI site? A link to an overview page/docs outlining the functions would be more appropriate or if intent on describing them each place it in a spoiler tag as you've done for the function names lists (also categorization itself is a form of showing what an entry is capable of).

Many programs combine functionality of what one could describe as disparate things but they're nevertheless a single program. Opera (Presto and earlier) combined a complete email client, RSS/Atom feed client, Bittorrent downloader, IRC client and of course web browser and yet it's obviously still considered one program and the entry merely names them. Granted for CLI functions it mightn't be clear from shortened names what each does but that's where a docs page or brief notes in a spoiler tag would be more appropriate.

For Busybox there are 26 pages of results in the CLI DB of entries for its functions :!: Taking a description from a couple random examples: 'Print system architecture. Alias for `uname -m'.', or, 'Base64 encode or decode FILE to standard output.' That's the entire description. It's essentially a --help level blurb about a function made into its own entry.

I mean, you clearly have personal feelings about the project (and I'd imagine given some other easy to use and free database site you might be using/customizing that for the same purpose) but tbh some of the concepts/goals are contrary to ethos of the primary site and some of the responses to critiques have come across as politely dismissive since you have your own goals formed and are eager to pursue them.

At some point a site volunteer---whether you or someone else---is going to have to check and update any such entries which really will grow into a mammoth task particularly if this decision to split functions into their own entries is kept. Every one of them has their release date, file size, category (in the case of Busybox most are just under 'Unix tools') and website link. OTOH this could be avoided by keeping singular programs in their own entry, while also making more sense for upvoting/downvoting entries of the program instead of its individual functions.

billon
Posts: 843
Joined: Sat Jun 23, 2012 4:28 pm

Re: PowerShell

#8 Post by billon »

SYSTEM wrote: Thu Nov 12, 2020 9:48 pm The newer version (formerly called PowerShell Core) doesn't, and needs to be manually installed if you want it. (And it's also available for Linux and macOS.)
Aaand??? What does it change? It's not portable in the first place, that's like entries for Microsoft Office, Windows Media Player or, I don't know, Movie Maker, which also doesn't shipped.
What all that even have to do with TPFC???

billon
Posts: 843
Joined: Sat Jun 23, 2012 4:28 pm

Re: PowerShell

#9 Post by billon »

Stop the madness

User avatar
webfork
Posts: 10818
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: PowerShell

#10 Post by webfork »

billon wrote: Fri Nov 13, 2020 12:01 am What all that even have to do with TPFC???
The topic has actually been discussed before, with vevy suggesting that comprehensiveness means both portable and non-portable are covered. In fairness, I'm not sure a Windows CLI database that excludes PowerShell makes much sense. And I'm not at all surprised that Microsoft's CLI effort writes settings outside of the local app folder.
Last edited by webfork on Fri Nov 13, 2020 12:09 pm, edited 1 time in total.
Reason: (better wording)

User avatar
vevy
Posts: 795
Joined: Tue Sep 10, 2019 11:17 am

Re: PowerShell

#11 Post by vevy »

@Specular
Thanks for the honest, constructive criticism!

First, I want to say you are generally right about the alias entries. It should be with the original entry it refers to.

In the case of arch command (alias to uname -a), it is a bit of special case, since it is a known command that is be searched for and used by name. It even has its own executable (arch.exe) with some releases for Windows (see coreutils in Cygwin or MSYS2). But I can definitely see it go either way. For example, I included hd in the description of hexdump. Same with egrep and fgrep and Gzip, etc.
----------------------------------------------------------------------------------------------------------
Why add these subcommands as entries:
  • It only applies to only those programs like BusyBox of sfk. I think you'd be hard-pressed to find a CLI equivalent for Opera. Even then, Opera is (was :cry:) an "internet suite". There is still a theme connecting its parts.
  • These tools are their own tools inside the main executable. They have their own help and syntax independent from the rest.
  • They are disparate by design. Even look at the names: one is named after the Swiss Army Knife and the other after the multi-function children's toy!
  • These subcommands are usually designed to mimic the function of common/well-known standalone tools.
  • A common feature is also that you usually access the function by typing "command subcommand {switches and arguments}". You don't see that very often, and I think it reflects the idea of them being a tool within a tool.
The point for listing the individual is the use cases for different functions without making behemoth entries with giant descriptions and loads of use cases. This aspect definitely needs some work. So do the descriptions. I also direct your attention to this post.
----------------------------------------------------------------------------------------------------------
Specular wrote: Thu Nov 12, 2020 10:12 pm I mean, you clearly have personal feelings about the project (and I'd imagine given some other easy to use and free database site you might be using/customizing that for the same purpose) but tbh some of the concepts/goals are contrary to ethos of the primary site and some of the responses to critiques have come across as politely dismissive since you have your own goals formed and are eager to pursue them.
I definitely don't mean to be dismissive. To be honest, I get a kick when someone raises a point that I had already thought about and have at least a possible solution for. I am like, "Aha, I already thought of that! What do you think of my solution?". I don't mean to be dismissive of the concern itself or the person. :oops:

If anything, I feel bad when I take a lot of time to write a detailed reply, only for it to be dismissed without showing me what's wrong with my arguments!



For example, you raise the issue of maintainability. That is a great point. I spent a lot of time mulling over this and to come with a solution that addresses the issue. In this case, inherited fields! All those child entries automatically get the common details from the parent entry. You only have to edit one!* It is not a new idea at all. Just one that seems to work to me. Andrew ironed it out with me and now we have a working solution in place!

(*) As for categories/use cases, they should be individualized. That's the point. Also, they are unlikely to change much after they are done, if at all, unless there are structural changes beyond regular maintenance.

Even votes for the parent item can be inherited by the child entries. I thought whether it is best to just carry over the vote or give a percentage, and how much voting for a child signifies a vote for the parent (the other way around is usually truer), etc.
----------------------------------------------------------------------------------------------------------

One last thing, if you don't want to see child entries in the database, you can easily do that if the filters system I proposed gets implemented. It shouldn't be too hard at all for Andrew to do it in a simple way, but I could use your support!

User avatar
Andrew Lee
Posts: 3048
Joined: Sat Feb 04, 2006 9:19 am
Contact:

Re: PowerShell

#12 Post by Andrew Lee »

billon wrote: Thu Nov 12, 2020 1:48 pm What's next? Entry for CMD.exe? Entries for Paint, WordPad and Notepad?
It's built-in Windows program, what are you even talking about?
I am with billon on this. I think this is not the first time I have mentioned we shouldn't be after "comprehensive", just like the mainline database.

BTW, use your vote wisely. Eventually, we will start hiding the private entries. If enough people think eg. Powershell is a sucky idea, it will not go public. Plain and simple. We dealt with Java and .NET stuff in the mainline database this way as well.

Post Reply