add support for docker and more commads for git#41
add support for docker and more commads for git#41AnderssonPeter merged 5 commits intoAnderssonPeter:mainfrom
Conversation
|
Thanks for your PR, I will try to get to it this week! |
PowerType/Dictionaries/docker.ps1
Outdated
| Name = "Containers"; | ||
| Description = "List of running containers"; | ||
| CommandExpression = { docker ps --format "{{.Names}}" }; | ||
| Cache = [Cache]@{ ByTime = New-TimeSpan -Seconds 10 } |
There was a problem hiding this comment.
This could be extended with ByCommand = @("kill", "run", "stop", "start", "rm", "pause", "purge") to force a update when any of the listed commands are run. (Same goes for $allContainers, but there you can exclude stop, start and pause?)
There was a problem hiding this comment.
I forgot to add the stop, start, and pause commands all at once. I'm adding them at the end, and I think I know how to add ByCommand = @("kill", "run", "stop", "start", "rm", "pause").
$containers = [DynamicSource]@{
Name = "Containers";
Description = "List of running containers";
CommandExpression = {
docker ps --format "{{.Names}}"
};
Cache = [Cache]@{
ByCurrentWorkingDirectory = $true;
ByTime = New-TimeSpan -Seconds 10;
ByCommand = @("kill", "run", "stop", "start","rm","pause")
}
}
$allContainers = [DynamicSource]@{
Name = "All Containers";
Description = "List of all containers (running + stopped)";
CommandExpression = {
docker ps -a --format "{{.Names}}"
};
Cache = [Cache]@{
ByCurrentWorkingDirectory = $true;
ByTime = New-TimeSpan -Seconds 10 ;
ByCommand = @("kill", "run", "stop", "start","rm","pause")
}
}
Is that okay?
README.md
Outdated
| # How it works | ||
| PowerType integrates with **PSReadLine** to provide command predictions. | ||
| It works by: | ||
| - Reading your command history (for context and suggestions). |
There was a problem hiding this comment.
In it's current form powertype does not read you history, but it does act on executed commands, to clear caches
There was a problem hiding this comment.
Well, better delete that line.
- Reading your command history (for context and suggestions).
README.md
Outdated
| - [Uninstall](#uninstall) | ||
| - [Troubleshooting](#troubleshooting) | ||
| - [Progress](#progress) | ||
| - [How it works](#How it works) |
There was a problem hiding this comment.
This link doesn't work correctly
There was a problem hiding this comment.
corrected
The problem was that you had to keep everything together "how it works"
How it works
|
In theory, I've finished the new changes. I hope they're okay. I'll send the pull request in a few moments. What I also did was use the same format you used in Git in Docker so it maintains the same structure. If anything, let me know. I can continue with more changes tomorrow. |
|
Thanks for your fast response, and thanks for contributing, I will try to review, merge and release this week! |
|
@Juanma7882 a new release with your changes plus a few of mine should soon be up 0.1.1 |
Added a new dictionary for Docker in PowerType, enabling autocomplete for common Docker commands and parameters.
✅ Main changes
Created the docker.ps1 dictionary file.
Implemented basic commands (docker run, docker build, docker ps, etc.).
Integrated with PSReadLine to provide real-time suggestions.
🔍 Notes
This initial dictionary covers the most commonly used commands, but it can be extended with more subcommands in future updates.
Tested on Windows with PowerShell 7.2.