Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/PowerShell/JsonAdapter
https://github.com/PowerShell/JsonAdapter
Last synced: 30 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/PowerShell/JsonAdapter
- Owner: PowerShell
- License: mit
- Archived: true
- Created: 2023-06-01T21:20:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-26T21:35:38.000Z (6 months ago)
- Last Synced: 2024-09-28T21:06:11.745Z (3 months ago)
- Language: C#
- Size: 25.4 KB
- Stars: 14
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
- jimsghstars - PowerShell/JsonAdapter - (C# #)
README
# PSAdapter
This is a FeedbackProvider and SuggestionPredictor for native utilities which
have an adapter written for them, or if the `jc` utility is installed suggestions
on how it may be incorporated into the users command line.The following is a transcript where the `uname` command is used and has a
`uname-adapter` script which can convert the output to an object, as well as
how `jc` can be used to transform the text output into an object suitable
for use with PowerShell.This module will work only with PowerShell 7.4 preview 3 or newer.
```powershell
PS> ^C
PS> pwsh-preview
PS> import-module Microsoft.PowerShell.PSAdapter
PS> set-psReadLineOption -PredictionViewStyle ListView
PS> uname -a
> uname -a [History]
> uname | jc --uname | ConvertFrom-Json [PSAdapter]
> uname | uname-adapter [PSAdapter]
Darwin JamesiMac20.local 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:22 PDT 2023; root:xnu-8796.121.3~7/RELEASE_X86_64 x86_64[PSAdapter]
PSAdapter found additional ways to run.
➤ uname -a | jc --uname | ConvertFrom-Json
➤ uname -a | uname-adapterPS/PSAdapter> uname -a | jc --uname | ConvertFrom-Json
machine : x86_64
kernel_name : Darwin
node_name : JamesiMac20.local
kernel_release : 22.5.0
kernel_version : Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:22 PDT 2023; root:xnu-8796.121.3~7/RELEASE_X86_64PS>
```## Code of Conduct
Please see our [Code of Conduct](.github/CODE_OF_CONDUCT.md) before participating in this project.
## Security Policy
For any security issues, please see our [Security Policy](.github/SECURITY.md).