From 13fec5784f931e1148040ef9b18e650531b071d8 Mon Sep 17 00:00:00 2001 From: Juanma7882 Date: Thu, 25 Sep 2025 17:14:43 -0300 Subject: [PATCH 1/8] new npm commands added --- PowerType/Dictionaries/npm.ps1 | 186 ++++++++++++++++++++++++++++++++- 1 file changed, 181 insertions(+), 5 deletions(-) diff --git a/PowerType/Dictionaries/npm.ps1 b/PowerType/Dictionaries/npm.ps1 index c5e8c56..4f75c46 100644 --- a/PowerType/Dictionaries/npm.ps1 +++ b/PowerType/Dictionaries/npm.ps1 @@ -13,20 +13,47 @@ } } +$global = [DynamicSource]@{ + Name = "Global npm Packages"; + Description = "A list of all globally installed npm packages"; + CommandExpression = { + npm ls -g --depth=0 --parseable | ForEach-Object { $_ -replace '.*node_modules[\\/]', '' } + }; + Cache = [Cache]@{ + ByCurrentWorkingDirectory = $false; + ByTime = New-TimeSpan -Seconds 30 + } +} +$dependencies = [DynamicSource]@{ + Name = "Dependencies"; + Description = "A list of all dependencies defined in package.json"; + CommandExpression = { + $packageFile = Find-FileRecursive $pwd.Path 'package.json' + if ($packageFile) { + (Get-Content $packageFile | ConvertFrom-Json).dependencies.PSObject.Properties | % { $_.Name } + } + }; + Cache = [Cache]@{ + ByCurrentWorkingDirectory = $true; + ByTime = New-TimeSpan -Seconds 10 + } +} + [PowerTypeDictionary]@{ + Keys = @("npm"); + Name = "npm"; + Description = "the package manager for JavaScript"; Platforms = ([Platforms]::All); State = [DictionaryState]::Experimental -bor [DictionaryState]::Incomplete; Source = "Hand crafted"; Url = "https://www.npmjs.com/"; - Keys = @("npm"); - Name = "npm"; - Description = "the package manager for JavaScript"; + Version = [Version]::Parse("0.0.2"); Parameters = @( [CommandParameter]@{ Keys = @("start"); Name = "start"; Description = "Alias for 'npm run start'"; - } + }, [CommandParameter]@{ Keys = @("run", "run-script", "rum", "urn"); Name = "run"; @@ -37,7 +64,156 @@ Description = "What script to run"; Source = $scripts; } - ); + ) + }, + [CommandParameter]@{ + Keys = @("install","i"); + Name = "install"; + Description = "Install everything in package.json"; + Parameters = @( + [ValueParameter]@{ + Keys = @("mysql"); + Name = "mysql"; + Description = "Installs the original package to interact with MySQL from Node.js"; + }, + # Common database drivers and ORMs + [ValueParameter]@{ + Keys = @("mysql2"); + Name = "mysql2"; + Description = "Installs the improved, faster MySQL driver"; + }, + [ValueParameter]@{ + Keys = @("pg"); + Name = "pg"; + Description = "Installs the PostgreSQL client for Node.js (also called node-postgres)"; + }, + [ValueParameter]@{ + Keys = @("pg-promise"); + Name = "pg-promise"; + Description = "Installs a simpler, promise-based interface for PostgreSQL"; + }, + [ValueParameter]@{ + Keys = @("mongoose"); + Name = "mongoose"; + Description = "Installs an ODM (Object Document Mapping) for MongoDB with schemas and validation"; + }, + [ValueParameter]@{ + Keys = @("mongodb"); + Name = "mongodb"; + Description = "Installs the official MongoDB driver for Node.js"; + }, + [ValueParameter]@{ + Keys = @("sqlite3"); + Name = "sqlite3"; + Description = "Installs the SQLite binding for Node.js"; + }, + [ValueParameter]@{ + Keys = @("better-sqlite3"); + Name = "better-sqlite3"; + Description = "Installs a faster and simpler version of SQLite"; + }, + [ValueParameter]@{ + Keys = @("redis"); + Name = "redis"; + Description = "Installs the modern Redis client for Node.js"; + }, + [ValueParameter]@{ + Keys = @("ioredis"); + Name = "ioredis"; + Description = "Installs a robust Redis client with more features"; + }, + [ValueParameter]@{ + Keys = @("tedious"); + Name = "tedious"; + Description = "Installs the official Microsoft SQL Server (MSSQL) driver for Node.js"; + }, + [ValueParameter]@{ + Keys = @("sequelize"); + Name = "sequelize"; + Description = "Installs Sequelize, a promise-based ORM supporting PostgreSQL, MySQL, MariaDB, SQLite and SQL Server"; + }, + [ValueParameter]@{ + Keys = @("typeorm"); + Name = "typeorm"; + Description = "Installs TypeORM, a feature-rich ORM supporting Active Record and Data Mapper patterns for TypeScript and JavaScript"; + }, + [ValueParameter]@{ + Keys = @("prisma"); + Name = "prisma"; + Description = "Installs Prisma, a modern ORM with auto-generated queries, migrations and type-safe client for Node.js"; + }, + [ValueParameter]@{ + Keys = @("objection"); + Name = "objection"; + Description = "Installs Objection.js, an SQL-friendly ORM built on top of Knex.js for flexible query building"; + }, + [ValueParameter]@{ + Keys = @("bookshelf"); + Name = "bookshelf"; + Description = "Installs Bookshelf.js, an ORM built on top of Knex.js that provides relations and plugins"; + }, + # finish common database drivers and ORMs + [ValueParameter]@{ + Keys = @("typescript"); + Name = "typescript"; + Description = "Installs TypeScript locally"; + }, + [ValueParameter]@{ + Keys = @("-D", "--save-dev"); + Name = "-D"; + Description = "Installs the package as a development dependency (saved under devDependencies)"; + }, + [ValueParameter]@{ + Keys = @("-g", "--global"); + Name = "-g"; + Description = "Installs the package globally, making it available system-wide"; + } + ) + }, + [CommandParameter]@{ + Keys = @("init"); + Name = "init"; + Description = "This command initializes a package by creating a package.json file."; + }, + [CommandParameter]@{ + Keys = @("uninstall","remove"); + Name = "uninstall"; + Description = "uninstall a package"; + }, + [CommandParameter]@{ + Keys = @("update"); + Name = "update"; + Description = "update a package"; + }, + [CommandParameter]@{ + Keys = @("outdated"); + Name = "outdated"; + Description = "list outdated packages"; + }, + [CommandParameter]@{ + Keys = @("audit"); + Name = "audit"; + Description = "check for security vulnerabilities"; + }, + [CommandParameter]@{ + Keys = @("list","ls","la","ll"); + Name = "list"; + Description = "list installed packages"; + }, + [CommandParameter]@{ + Keys = @("search","s"); + Name = "search"; + Description = "search for packages"; + }, + [CommandParameter]@{ + Keys = @("help","h","?"); + Name = "help"; + Description = "show help"; + }, + [CommandParameter]@{ + Keys = @("version","v"); + Name = "version"; + Description = "show version"; } ) } From 8b0777b7e9cbd7feda2b3dae08107ed805c857c4 Mon Sep 17 00:00:00 2001 From: Juanma7882 Date: Thu, 25 Sep 2025 21:03:00 -0300 Subject: [PATCH 2/8] correcting from valueParameter to flagParameter in npm file --- PowerType/Dictionaries/npm.ps1 | 74 +++++++++------------------------- 1 file changed, 19 insertions(+), 55 deletions(-) diff --git a/PowerType/Dictionaries/npm.ps1 b/PowerType/Dictionaries/npm.ps1 index 4f75c46..adc9b0d 100644 --- a/PowerType/Dictionaries/npm.ps1 +++ b/PowerType/Dictionaries/npm.ps1 @@ -13,32 +13,6 @@ } } -$global = [DynamicSource]@{ - Name = "Global npm Packages"; - Description = "A list of all globally installed npm packages"; - CommandExpression = { - npm ls -g --depth=0 --parseable | ForEach-Object { $_ -replace '.*node_modules[\\/]', '' } - }; - Cache = [Cache]@{ - ByCurrentWorkingDirectory = $false; - ByTime = New-TimeSpan -Seconds 30 - } -} -$dependencies = [DynamicSource]@{ - Name = "Dependencies"; - Description = "A list of all dependencies defined in package.json"; - CommandExpression = { - $packageFile = Find-FileRecursive $pwd.Path 'package.json' - if ($packageFile) { - (Get-Content $packageFile | ConvertFrom-Json).dependencies.PSObject.Properties | % { $_.Name } - } - }; - Cache = [Cache]@{ - ByCurrentWorkingDirectory = $true; - ByTime = New-TimeSpan -Seconds 10 - } -} - [PowerTypeDictionary]@{ Keys = @("npm"); Name = "npm"; @@ -71,102 +45,92 @@ $dependencies = [DynamicSource]@{ Name = "install"; Description = "Install everything in package.json"; Parameters = @( - [ValueParameter]@{ + # Common database drivers and ORMs + [FlagParameter]@{ Keys = @("mysql"); Name = "mysql"; Description = "Installs the original package to interact with MySQL from Node.js"; }, - # Common database drivers and ORMs - [ValueParameter]@{ + [FlagParameter]@{ Keys = @("mysql2"); Name = "mysql2"; Description = "Installs the improved, faster MySQL driver"; }, - [ValueParameter]@{ + [FlagParameter]@{ Keys = @("pg"); Name = "pg"; Description = "Installs the PostgreSQL client for Node.js (also called node-postgres)"; }, - [ValueParameter]@{ + [FlagParameter]@{ Keys = @("pg-promise"); Name = "pg-promise"; Description = "Installs a simpler, promise-based interface for PostgreSQL"; }, - [ValueParameter]@{ + [FlagParameter]@{ Keys = @("mongoose"); Name = "mongoose"; Description = "Installs an ODM (Object Document Mapping) for MongoDB with schemas and validation"; }, - [ValueParameter]@{ + [FlagParameter]@{ Keys = @("mongodb"); Name = "mongodb"; Description = "Installs the official MongoDB driver for Node.js"; }, - [ValueParameter]@{ + [FlagParameter]@{ Keys = @("sqlite3"); Name = "sqlite3"; Description = "Installs the SQLite binding for Node.js"; }, - [ValueParameter]@{ + [FlagParameter]@{ Keys = @("better-sqlite3"); Name = "better-sqlite3"; Description = "Installs a faster and simpler version of SQLite"; }, - [ValueParameter]@{ + [FlagParameter]@{ Keys = @("redis"); Name = "redis"; Description = "Installs the modern Redis client for Node.js"; }, - [ValueParameter]@{ + [FlagParameter]@{ Keys = @("ioredis"); Name = "ioredis"; Description = "Installs a robust Redis client with more features"; }, - [ValueParameter]@{ + [FlagParameter]@{ Keys = @("tedious"); Name = "tedious"; Description = "Installs the official Microsoft SQL Server (MSSQL) driver for Node.js"; }, - [ValueParameter]@{ + [FlagParameter]@{ Keys = @("sequelize"); Name = "sequelize"; Description = "Installs Sequelize, a promise-based ORM supporting PostgreSQL, MySQL, MariaDB, SQLite and SQL Server"; }, - [ValueParameter]@{ + [FlagParameter]@{ Keys = @("typeorm"); Name = "typeorm"; Description = "Installs TypeORM, a feature-rich ORM supporting Active Record and Data Mapper patterns for TypeScript and JavaScript"; }, - [ValueParameter]@{ + [FlagParameter]@{ Keys = @("prisma"); Name = "prisma"; Description = "Installs Prisma, a modern ORM with auto-generated queries, migrations and type-safe client for Node.js"; }, - [ValueParameter]@{ + [FlagParameter]@{ Keys = @("objection"); Name = "objection"; Description = "Installs Objection.js, an SQL-friendly ORM built on top of Knex.js for flexible query building"; }, - [ValueParameter]@{ + [FlagParameter]@{ Keys = @("bookshelf"); Name = "bookshelf"; Description = "Installs Bookshelf.js, an ORM built on top of Knex.js that provides relations and plugins"; }, - # finish common database drivers and ORMs - [ValueParameter]@{ + # finish common database drivers and ORMs + [FlagParameter]@{ Keys = @("typescript"); Name = "typescript"; Description = "Installs TypeScript locally"; - }, - [ValueParameter]@{ - Keys = @("-D", "--save-dev"); - Name = "-D"; - Description = "Installs the package as a development dependency (saved under devDependencies)"; - }, - [ValueParameter]@{ - Keys = @("-g", "--global"); - Name = "-g"; - Description = "Installs the package globally, making it available system-wide"; } ) }, From cf4788ecb7a124fae9e95f0effa4b2d885b546cc Mon Sep 17 00:00:00 2001 From: Juanma7882 Date: Sat, 27 Sep 2025 11:34:30 -0300 Subject: [PATCH 3/8] packets moved a value parameter --- PowerType/Dictionaries/npm.ps1 | 179 ++++++++++++++++----------------- 1 file changed, 85 insertions(+), 94 deletions(-) diff --git a/PowerType/Dictionaries/npm.ps1 b/PowerType/Dictionaries/npm.ps1 index adc9b0d..2334920 100644 --- a/PowerType/Dictionaries/npm.ps1 +++ b/PowerType/Dictionaries/npm.ps1 @@ -40,100 +40,6 @@ } ) }, - [CommandParameter]@{ - Keys = @("install","i"); - Name = "install"; - Description = "Install everything in package.json"; - Parameters = @( - # Common database drivers and ORMs - [FlagParameter]@{ - Keys = @("mysql"); - Name = "mysql"; - Description = "Installs the original package to interact with MySQL from Node.js"; - }, - [FlagParameter]@{ - Keys = @("mysql2"); - Name = "mysql2"; - Description = "Installs the improved, faster MySQL driver"; - }, - [FlagParameter]@{ - Keys = @("pg"); - Name = "pg"; - Description = "Installs the PostgreSQL client for Node.js (also called node-postgres)"; - }, - [FlagParameter]@{ - Keys = @("pg-promise"); - Name = "pg-promise"; - Description = "Installs a simpler, promise-based interface for PostgreSQL"; - }, - [FlagParameter]@{ - Keys = @("mongoose"); - Name = "mongoose"; - Description = "Installs an ODM (Object Document Mapping) for MongoDB with schemas and validation"; - }, - [FlagParameter]@{ - Keys = @("mongodb"); - Name = "mongodb"; - Description = "Installs the official MongoDB driver for Node.js"; - }, - [FlagParameter]@{ - Keys = @("sqlite3"); - Name = "sqlite3"; - Description = "Installs the SQLite binding for Node.js"; - }, - [FlagParameter]@{ - Keys = @("better-sqlite3"); - Name = "better-sqlite3"; - Description = "Installs a faster and simpler version of SQLite"; - }, - [FlagParameter]@{ - Keys = @("redis"); - Name = "redis"; - Description = "Installs the modern Redis client for Node.js"; - }, - [FlagParameter]@{ - Keys = @("ioredis"); - Name = "ioredis"; - Description = "Installs a robust Redis client with more features"; - }, - [FlagParameter]@{ - Keys = @("tedious"); - Name = "tedious"; - Description = "Installs the official Microsoft SQL Server (MSSQL) driver for Node.js"; - }, - [FlagParameter]@{ - Keys = @("sequelize"); - Name = "sequelize"; - Description = "Installs Sequelize, a promise-based ORM supporting PostgreSQL, MySQL, MariaDB, SQLite and SQL Server"; - }, - [FlagParameter]@{ - Keys = @("typeorm"); - Name = "typeorm"; - Description = "Installs TypeORM, a feature-rich ORM supporting Active Record and Data Mapper patterns for TypeScript and JavaScript"; - }, - [FlagParameter]@{ - Keys = @("prisma"); - Name = "prisma"; - Description = "Installs Prisma, a modern ORM with auto-generated queries, migrations and type-safe client for Node.js"; - }, - [FlagParameter]@{ - Keys = @("objection"); - Name = "objection"; - Description = "Installs Objection.js, an SQL-friendly ORM built on top of Knex.js for flexible query building"; - }, - [FlagParameter]@{ - Keys = @("bookshelf"); - Name = "bookshelf"; - Description = "Installs Bookshelf.js, an ORM built on top of Knex.js that provides relations and plugins"; - }, - # finish common database drivers and ORMs - [FlagParameter]@{ - Keys = @("typescript"); - Name = "typescript"; - Description = "Installs TypeScript locally"; - } - ) - }, [CommandParameter]@{ Keys = @("init"); Name = "init"; @@ -178,6 +84,91 @@ Keys = @("version","v"); Name = "version"; Description = "show version"; + }, + [CommandParameter]@{ + Keys = @("install","i"); + Name = "install"; + Description = "Install everything in package.json"; + Parameters = @( + # Paquetes comunes (drivers, ORMs, etc.) + [ValueParameter]@{ + Name = "package"; + Description = "The npm package to install"; + Source = [StaticSource]@{ + Name = "Common npm packages"; + Items = @( + [SourceItem]@{ + Name = "mysql"; + Description = "Original MySQL driver"; + }, + [SourceItem]@{ + Name = "mysql2"; + Description = "Faster MySQL driver"; + }, + [SourceItem]@{ + Name = "pg"; + Description = "PostgreSQL client (node-postgres)"; + }, + [SourceItem]@{ + Name = "pg-promise"; + Description = "Promise-based PostgreSQL client"; + }, + [SourceItem]@{ + Name = "mongoose"; + Description = "MongoDB ODM with schemas"; + }, + [SourceItem]@{ + Name = "mongodb"; + Description = "Official MongoDB driver"; + }, + [SourceItem]@{ + Name = "sqlite3"; + Description = "SQLite binding"; + }, + [SourceItem]@{ + Name = "better-sqlite3"; + Description = "Faster SQLite library"; + }, + [SourceItem]@{ + Name = "redis"; + Description = "Modern Redis client"; + }, + [SourceItem]@{ + Name = "ioredis"; + Description = "Advanced Redis client"; + }, + [SourceItem]@{ + Name = "tedious"; + Description = "MSSQL driver for Node.js"; + }, + [SourceItem]@{ + Name = "sequelize"; + Description = "Promise-based ORM"; + }, + [SourceItem]@{ + Name = "typeorm"; + Description = "ORM with Active Record & Data Mapper"; + }, + [SourceItem]@{ + Name = "prisma"; + Description = "Modern type-safe ORM"; + }, + [SourceItem]@{ + Name = "objection"; + Description = "ORM built on Knex.js"; + }, + [SourceItem]@{ + Name = "bookshelf"; + Description = "ORM built on Knex.js with plugins"; + }, + [SourceItem]@{ + Name = "typescript"; + Description = "TypeScript compiler"; + } + ) + } + } + ) } ) } From fc38eb268c380a8c7b8c587f835ee04edb37f057 Mon Sep 17 00:00:00 2001 From: Juanma7882 Date: Sun, 28 Sep 2025 09:49:50 -0300 Subject: [PATCH 4/8] fix npm --- PowerType/Dictionaries/npm.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PowerType/Dictionaries/npm.ps1 b/PowerType/Dictionaries/npm.ps1 index 2334920..16e2562 100644 --- a/PowerType/Dictionaries/npm.ps1 +++ b/PowerType/Dictionaries/npm.ps1 @@ -66,7 +66,7 @@ Description = "check for security vulnerabilities"; }, [CommandParameter]@{ - Keys = @("list","ls","la","ll"); + Keys = @("list","la","ll"); Name = "list"; Description = "list installed packages"; }, From af25188e07a541689d070de74963ef2399c1e3ee Mon Sep 17 00:00:00 2001 From: Juanma7882 Date: Mon, 20 Oct 2025 13:08:46 -0300 Subject: [PATCH 5/8] correction in the description --- PowerType/Dictionaries/cmd.ps1 | 287 +++++++++++++++++++++++++++++++++ 1 file changed, 287 insertions(+) create mode 100644 PowerType/Dictionaries/cmd.ps1 diff --git a/PowerType/Dictionaries/cmd.ps1 b/PowerType/Dictionaries/cmd.ps1 new file mode 100644 index 0000000..d574f9c --- /dev/null +++ b/PowerType/Dictionaries/cmd.ps1 @@ -0,0 +1,287 @@ +[PowerTypeDictionary]@{ + Keys = @(""," "); + Name = "Console"; + Description = "Common console and shell"; + Platforms = ([Platforms]::All); + State = [DictionaryState]::Experimental -bor [DictionaryState]::Incomplete; + Source = "Hand crafted"; + Url = "https://learn.microsoft.com/en-us/powershell/"; + Version = [Version]::Parse("0.0.2"); + + Parameters = @( + # ------------------------------ + # Directory Browsing + # ------------------------------ + [CommandParameter]@{ + Keys = @("cd", "chdir"); + Name = "cd"; + Description = "Change the current working directory"; + Parameters = @( + [ValueParameter]@{ + Name = "path"; + Description = "Target directory path"; + } + ) + }, + [CommandParameter]@{ + Keys = @("dir", "ls"); + Name = "list"; + Description = "List files and directories"; + Parameters = @( + [FlagParameter]@{ + Keys = @("a", "-a", "/a"); + Name = "all"; + Description = "Show hidden files"; + }, + [FlagParameter]@{ + Keys = @("l", "-l"); + Name = "long"; + Description = "Long listing format"; + } + ) + }, + [CommandParameter]@{ + Keys = @("pwd"); + Name = "pwd"; + Description = "Print the current working directory"; + }, + + # ------------------------------ + # Files and directories + # ------------------------------ + [CommandParameter]@{ + Keys = @("mkdir", "md"); + Name = "mkdir"; + Description = "Create a new directory"; + Parameters = @( + [ValueParameter]@{ + Name = "name"; + Description = "Name of the directory to create"; + } + ) + }, + [CommandParameter]@{ + Keys = @("rmdir", "rd"); + Name = "rmdir"; + Description = "Remove a directory"; + Parameters = @( + [ValueParameter]@{ + Name = "path"; + Description = "Path of the directory to remove"; + } + ) + }, + [CommandParameter]@{ + Keys = @("del", "rm"); + Name = "remove"; + Description = "Delete one or more files"; + Parameters = @( + [ValueParameter]@{ + Name = "file"; + Description = "File(s) to delete"; + }, + [FlagParameter]@{ + Keys = @("f", "-f", "/f"); + Name = "force"; + Description = "Force deletion without confirmation"; + } + ) + }, + [CommandParameter]@{ + Keys = @("copy", "cp"); + Name = "copy"; + Description = "Copy files or directories"; + Parameters = @( + [ValueParameter]@{ + Name = "source"; + Description = "Source path"; + }, + [ValueParameter]@{ + Name = "destination"; + Description = "Destination path"; + } + ) + }, + [CommandParameter]@{ + Keys = @("move", "mv"); + Name = "move"; + Description = "Move or rename files and directories"; + Parameters = @( + [ValueParameter]@{ + Name = "source"; + Description = "Source path"; + }, + [ValueParameter]@{ + Name = "destination"; + Description = "Destination path"; + } + ) + }, + + # ------------------------------ + # System + # ------------------------------ + [CommandParameter]@{ + Keys = @("clear", "cls"); + Name = "clear"; + Description = "Clear the console screen"; + }, + [CommandParameter]@{ + Keys = @("echo"); + Name = "echo"; + Description = "Display text or variable values"; + Parameters = @( + [ValueParameter]@{ + Name = "message"; + Description = "Text to display"; + } + ) + }, + [CommandParameter]@{ + Keys = @("exit"); + Name = "exit"; + Description = "Exit the current terminal session"; + }, + + # ------------------------------ + # System information + # ------------------------------ + [CommandParameter]@{ + Keys = @("whoami"); + Name = "whoami"; + Description = "Display the current user name"; + }, + [CommandParameter]@{ + Keys = @("hostname"); + Name = "hostname"; + Description = "Show the computer's hostname"; + }, + [CommandParameter]@{ + Keys = @("systeminfo"); + Name = "systeminfo"; + Description = "Display system information such as OS version and memory"; + }, + [CommandParameter]@{ + Keys = @("ver"); + Name = "ver"; + Description = "Show the operating system version"; + }, + + # ------------------------------ + # Processes + # ------------------------------ + [CommandParameter]@{ + Keys = @("tasklist", "ps"); + Name = "tasklist"; + Description = "Display a list of currently running processes"; + }, + [CommandParameter]@{ + Keys = @("taskkill", "kill"); + Name = "taskkill"; + Description = "Terminate a process by PID or name"; + Parameters = @( + [ValueParameter]@{ + Name = "pid_or_name"; + Description = "Process ID or name to terminate"; + }, + [FlagParameter]@{ + Keys = @("f", "-f", "/f"); + Name = "force"; + Description = "Force termination"; + } + ) + }, + + # ------------------------------ + # Network and connectivity + # ------------------------------ + [CommandParameter]@{ + Keys = @("ping"); + Name = "ping"; + Description = "Test network connectivity to a host"; + Parameters = @( + [ValueParameter]@{ + Name = "host"; + Description = "Hostname or IP address to ping"; + } + ) + }, + [CommandParameter]@{ + Keys = @("tracert", "traceroute"); + Name = "tracert"; + Description = "Trace the route packets take to a destination"; + Parameters = @( + [ValueParameter]@{ + Name = "host"; + Description = "Hostname or IP address to trace"; + } + ) + }, + [CommandParameter]@{ + Keys = @("ipconfig", "ifconfig"); + Name = "ipconfig"; + Description = "Display network configuration information"; + Parameters = @( + [FlagParameter]@{ + Keys = @("/all", "-a"); + Name = "all"; + Description = "Show all details"; + } + ) + }, + [CommandParameter]@{ + Keys = @("netstat"); + Name = "netstat"; + Description = "Display active TCP/UDP connections and listening ports"; + Parameters = @( + [FlagParameter]@{ + Keys = @("-a", "/a"); + Name = "all"; + Description = "Show all connections and listening ports"; + }, + [FlagParameter]@{ + Keys = @("-n", "/n"); + Name = "numeric"; + Description = "Show addresses and port numbers in numeric form"; + }, + [FlagParameter]@{ + Keys = @("-o", "/o"); + Name = "pid"; + Description = "Display process ID (PID) for each connection"; + } + ) + }, + [CommandParameter]@{ + Keys = @("curl", "wget"); + Name = "curl"; + Description = "Transfer data from or to a server via HTTP, HTTPS, or FTP"; + Parameters = @( + [ValueParameter]@{ + Name = "url"; + Description = "URL to fetch"; + } + ) + }, + [CommandParameter]@{ + Keys = @("nslookup", "dig"); + Name = "nslookup"; + Description = "Query DNS servers for domain information"; + Parameters = @( + [ValueParameter]@{ + Name = "domain"; + Description = "Domain name to resolve"; + } + ) + }, + [CommandParameter]@{ + Keys = @("netsh"); + Name = "netsh"; + Description = "Display or modify network configuration"; + }, + [CommandParameter]@{ + Keys = @("Get-NetTCPConnection"); + Name = "Get-NetTCPConnection"; + Description = "Display active TCP connections (PowerShell native)"; + } + ) +} From 8672423501c31dd04323b31b4aaaa3f8159e7a70 Mon Sep 17 00:00:00 2001 From: Juanma7882 Date: Mon, 20 Oct 2025 17:53:58 -0300 Subject: [PATCH 6/8] changing the cmd file name to pwsh --- PowerType/Dictionaries/{cmd.ps1 => pwsh.ps1} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename PowerType/Dictionaries/{cmd.ps1 => pwsh.ps1} (100%) diff --git a/PowerType/Dictionaries/cmd.ps1 b/PowerType/Dictionaries/pwsh.ps1 similarity index 100% rename from PowerType/Dictionaries/cmd.ps1 rename to PowerType/Dictionaries/pwsh.ps1 From c1f9a349ea54625de6c4c02c4459e718673d43d6 Mon Sep 17 00:00:00 2001 From: Juanma7882 Date: Sat, 1 Nov 2025 20:06:03 -0300 Subject: [PATCH 7/8] commands pwsh --- PowerType/Dictionaries/pwsh.ps1 | 300 ++++++-------------------------- 1 file changed, 58 insertions(+), 242 deletions(-) diff --git a/PowerType/Dictionaries/pwsh.ps1 b/PowerType/Dictionaries/pwsh.ps1 index d574f9c..5234ae5 100644 --- a/PowerType/Dictionaries/pwsh.ps1 +++ b/PowerType/Dictionaries/pwsh.ps1 @@ -1,287 +1,103 @@ [PowerTypeDictionary]@{ - Keys = @(""," "); - Name = "Console"; - Description = "Common console and shell"; + Keys = @("pwsh", "powershell", "ps"); + Name = "pwsh"; + Description = "PowerShell 7 executable options and flags."; Platforms = ([Platforms]::All); State = [DictionaryState]::Experimental -bor [DictionaryState]::Incomplete; Source = "Hand crafted"; Url = "https://learn.microsoft.com/en-us/powershell/"; - Version = [Version]::Parse("0.0.2"); + Version = [Version]::Parse("0.1.0"); Parameters = @( - # ------------------------------ - # Directory Browsing - # ------------------------------ [CommandParameter]@{ - Keys = @("cd", "chdir"); - Name = "cd"; - Description = "Change the current working directory"; - Parameters = @( - [ValueParameter]@{ - Name = "path"; - Description = "Target directory path"; - } - ) + Keys = @("-Command", "-c"); + Name = "Command"; + Description = "Executes the specified commands and then exits."; }, [CommandParameter]@{ - Keys = @("dir", "ls"); - Name = "list"; - Description = "List files and directories"; - Parameters = @( - [FlagParameter]@{ - Keys = @("a", "-a", "/a"); - Name = "all"; - Description = "Show hidden files"; - }, - [FlagParameter]@{ - Keys = @("l", "-l"); - Name = "long"; - Description = "Long listing format"; - } - ) + Keys = @("-File", "-f"); + Name = "File"; + Description = "Runs a script file with optional parameters."; }, [CommandParameter]@{ - Keys = @("pwd"); - Name = "pwd"; - Description = "Print the current working directory"; - }, - - # ------------------------------ - # Files and directories - # ------------------------------ - [CommandParameter]@{ - Keys = @("mkdir", "md"); - Name = "mkdir"; - Description = "Create a new directory"; - Parameters = @( - [ValueParameter]@{ - Name = "name"; - Description = "Name of the directory to create"; - } - ) - }, - [CommandParameter]@{ - Keys = @("rmdir", "rd"); - Name = "rmdir"; - Description = "Remove a directory"; - Parameters = @( - [ValueParameter]@{ - Name = "path"; - Description = "Path of the directory to remove"; - } - ) + Keys = @("-ExecutionPolicy", "-ex", "-ep"); + Name = "ExecutionPolicy"; + Description = "Sets the execution policy for the current session."; }, [CommandParameter]@{ - Keys = @("del", "rm"); - Name = "remove"; - Description = "Delete one or more files"; - Parameters = @( - [ValueParameter]@{ - Name = "file"; - Description = "File(s) to delete"; - }, - [FlagParameter]@{ - Keys = @("f", "-f", "/f"); - Name = "force"; - Description = "Force deletion without confirmation"; - } - ) + Keys = @("-OutputFormat", "-o", "-of"); + Name = "OutputFormat"; + Description = "Determines output format (Text or XML)."; }, [CommandParameter]@{ - Keys = @("copy", "cp"); - Name = "copy"; - Description = "Copy files or directories"; - Parameters = @( - [ValueParameter]@{ - Name = "source"; - Description = "Source path"; - }, - [ValueParameter]@{ - Name = "destination"; - Description = "Destination path"; - } - ) + Keys = @("-InputFormat", "-inp", "-if"); + Name = "InputFormat"; + Description = "Describes the format of input data (Text or XML)."; }, [CommandParameter]@{ - Keys = @("move", "mv"); - Name = "move"; - Description = "Move or rename files and directories"; - Parameters = @( - [ValueParameter]@{ - Name = "source"; - Description = "Source path"; - }, - [ValueParameter]@{ - Name = "destination"; - Description = "Destination path"; - } - ) + Keys = @("-WorkingDirectory", "-wd"); + Name = "WorkingDirectory"; + Description = "Sets the initial working directory."; }, - - # ------------------------------ - # System - # ------------------------------ [CommandParameter]@{ - Keys = @("clear", "cls"); - Name = "clear"; - Description = "Clear the console screen"; + Keys = @("-WindowStyle", "-w"); + Name = "WindowStyle"; + Description = "Sets the window style for the session."; }, [CommandParameter]@{ - Keys = @("echo"); - Name = "echo"; - Description = "Display text or variable values"; - Parameters = @( - [ValueParameter]@{ - Name = "message"; - Description = "Text to display"; - } - ) + Keys = @("-NoExit", "-noe"); + Name = "NoExit"; + Description = "Does not exit after running startup commands."; }, [CommandParameter]@{ - Keys = @("exit"); - Name = "exit"; - Description = "Exit the current terminal session"; + Keys = @("-NoProfile", "-nop"); + Name = "NoProfile"; + Description = "Does not load PowerShell profiles."; }, - - # ------------------------------ - # System information - # ------------------------------ [CommandParameter]@{ - Keys = @("whoami"); - Name = "whoami"; - Description = "Display the current user name"; + Keys = @("-NoLogo", "-nol"); + Name = "NoLogo"; + Description = "Hides the startup banner text."; }, [CommandParameter]@{ - Keys = @("hostname"); - Name = "hostname"; - Description = "Show the computer's hostname"; - }, - [CommandParameter]@{ - Keys = @("systeminfo"); - Name = "systeminfo"; - Description = "Display system information such as OS version and memory"; - }, - [CommandParameter]@{ - Keys = @("ver"); - Name = "ver"; - Description = "Show the operating system version"; - }, - - # ------------------------------ - # Processes - # ------------------------------ - [CommandParameter]@{ - Keys = @("tasklist", "ps"); - Name = "tasklist"; - Description = "Display a list of currently running processes"; - }, - [CommandParameter]@{ - Keys = @("taskkill", "kill"); - Name = "taskkill"; - Description = "Terminate a process by PID or name"; - Parameters = @( - [ValueParameter]@{ - Name = "pid_or_name"; - Description = "Process ID or name to terminate"; - }, - [FlagParameter]@{ - Keys = @("f", "-f", "/f"); - Name = "force"; - Description = "Force termination"; - } - ) - }, - - # ------------------------------ - # Network and connectivity - # ------------------------------ - [CommandParameter]@{ - Keys = @("ping"); - Name = "ping"; - Description = "Test network connectivity to a host"; - Parameters = @( - [ValueParameter]@{ - Name = "host"; - Description = "Hostname or IP address to ping"; - } - ) + Keys = @("-Interactive", "-i"); + Name = "Interactive"; + Description = "Starts PowerShell in interactive mode."; }, [CommandParameter]@{ - Keys = @("tracert", "traceroute"); - Name = "tracert"; - Description = "Trace the route packets take to a destination"; - Parameters = @( - [ValueParameter]@{ - Name = "host"; - Description = "Hostname or IP address to trace"; - } - ) + Keys = @("-NonInteractive", "-noni"); + Name = "NonInteractive"; + Description = "Disables interactive prompts and input."; }, [CommandParameter]@{ - Keys = @("ipconfig", "ifconfig"); - Name = "ipconfig"; - Description = "Display network configuration information"; - Parameters = @( - [FlagParameter]@{ - Keys = @("/all", "-a"); - Name = "all"; - Description = "Show all details"; - } - ) + Keys = @("-Login", "-l"); + Name = "Login"; + Description = "Starts PowerShell as a login shell (Linux/macOS only)."; }, [CommandParameter]@{ - Keys = @("netstat"); - Name = "netstat"; - Description = "Display active TCP/UDP connections and listening ports"; - Parameters = @( - [FlagParameter]@{ - Keys = @("-a", "/a"); - Name = "all"; - Description = "Show all connections and listening ports"; - }, - [FlagParameter]@{ - Keys = @("-n", "/n"); - Name = "numeric"; - Description = "Show addresses and port numbers in numeric form"; - }, - [FlagParameter]@{ - Keys = @("-o", "/o"); - Name = "pid"; - Description = "Display process ID (PID) for each connection"; - } - ) + Keys = @("-STA"); + Name = "STA"; + Description = "Starts PowerShell in a single-threaded apartment."; }, [CommandParameter]@{ - Keys = @("curl", "wget"); - Name = "curl"; - Description = "Transfer data from or to a server via HTTP, HTTPS, or FTP"; - Parameters = @( - [ValueParameter]@{ - Name = "url"; - Description = "URL to fetch"; - } - ) + Keys = @("-MTA"); + Name = "MTA"; + Description = "Starts PowerShell in a multi-threaded apartment."; }, [CommandParameter]@{ - Keys = @("nslookup", "dig"); - Name = "nslookup"; - Description = "Query DNS servers for domain information"; - Parameters = @( - [ValueParameter]@{ - Name = "domain"; - Description = "Domain name to resolve"; - } - ) + Keys = @("-EncodedCommand", "-e", "-ec"); + Name = "EncodedCommand"; + Description = "Runs a Base64-encoded PowerShell command."; }, [CommandParameter]@{ - Keys = @("netsh"); - Name = "netsh"; - Description = "Display or modify network configuration"; + Keys = @("-Version", "-v"); + Name = "Version"; + Description = "Displays the PowerShell version."; }, [CommandParameter]@{ - Keys = @("Get-NetTCPConnection"); - Name = "Get-NetTCPConnection"; - Description = "Display active TCP connections (PowerShell native)"; + Keys = @("-Help", "-?", "/?"); + Name = "Help"; + Description = "Displays this help message."; } ) } From 96ac2112146dccf1fd3810dba8d32f7fecadb6f9 Mon Sep 17 00:00:00 2001 From: Juanma7882 Date: Sat, 1 Nov 2025 20:13:00 -0300 Subject: [PATCH 8/8] commands pwsh --- PowerType/Dictionaries/pwsh.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PowerType/Dictionaries/pwsh.ps1 b/PowerType/Dictionaries/pwsh.ps1 index 5234ae5..61ab356 100644 --- a/PowerType/Dictionaries/pwsh.ps1 +++ b/PowerType/Dictionaries/pwsh.ps1 @@ -1,5 +1,5 @@ [PowerTypeDictionary]@{ - Keys = @("pwsh", "powershell", "ps"); + Keys = @("pwsh"); Name = "pwsh"; Description = "PowerShell 7 executable options and flags."; Platforms = ([Platforms]::All);