matt9ucci / dockercompletion Goto Github PK
View Code? Open in Web Editor NEWDocker command completion for PowerShell.
License: MIT License
Docker command completion for PowerShell.
License: MIT License
Any ideas why I'm unable to install the module?
I'm able to find it:
>find-Module DockerCompletion
Version Name Repository Description
------- ---- ---------- -----------
1.2300.0.230804 DockerCompletion PSGallery Docker command completion for PowerShell.
However, installation doesn't show any progress, it simply ends immediately, and then importing shows that module doesn't exist:
>Install-Module DockerCompletion # I tried with and without '-Scope CurrentUser'
>Import-module DockerCompletion
Import-Module: The specified module 'DockerCompletion' was not loaded because no valid module file was found in any module directory.
Poweshell version:
>$PSVersionTable
Name Value
---- -----
PSVersion 7.4.1
PSEdition Core
GitCommitId 7.4.1
OS Microsoft Windows 10.0.22621
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
run Measure-Script $PROFILE
, got this:
1 33 00:00.0024737 Import-Module Posh-Git
1 34 00:00.0026190 Import-Module DockerCompletion
1 35 00:00.0020116 Import-Module MavenAutoCompletion
1 36 00:00.0022025 Import-Module npm-completion
this is winget comparison:
0 38 00:00.0000000 # Winget
1 39 00:00.0006264 Register-ArgumentCompleter -Native -CommandName winget -ScriptBlock {
0 40 00:00.0000000 param($wordToComplete, $commandAst, $cursorPosition)
0 41 00:00.0000000 [Console]::InputEncoding = [Console]::OutputEncoding = $OutputEncoding =
[System.Text.Utf8Encoding]::new()
0 42 00:00.0000000 $Local:word = $wordToComplete.Replace('"', '""')
0 43 00:00.0000000 $Local:ast = $commandAst.ToString().Replace('"', '""')
0 44 00:00.0000000 winget complete --word="$Local:word" --commandline "$Local:ast" --position
$cursorPosition | ForEach-Object {
0 45 00:00.0000000 [System.Management.Automation.CompletionResult]::new($_, $_,
'ParameterValue', $_)
0 46 00:00.0000000 }
0 47 00:00.0000000 }
there's a thread talking about this.
As the title says, container names are not coming up with docker rm
Thanks for your work.
Hi,
I'm using the following function as a short hand for docker compose
in my $profile
.
function dc() { docker compose $args}
How can add the completions for this? Any suggestions?
Set-Alias
doesn't work. It doesn't work with parameters or sub commands.
Hello DockerCompletion Maintainers,
I am in the process of developing a PowerShell module designed to colorize Docker command outputs. My goal is to integrate this feature with DockerCompletion to streamline user workflows.
I believe there is potential for synergy between our tools, but I am uncertain if there is an existing method to extend DockerCompletion with an external module's argument completers.
I am currently trying to do this (but it is not ideal for me to modify your source code):
Your advice on this matter would be invaluable, and I am open to any suggestions you may have. The addition of such extensibility to DockerCompletion could offer significant benefits to users looking for a more customized command-line experience.
Thank you for your dedication to developing DockerCompletion, and I hope my contribution can further enrich this tool.
Best regards,
IsWladi
Why does your Windows Powershell ISE display a list of parameters? In my ISE, I can only loop parameter by Tab.
Windows: 10
Powershell: 5.1
I have successfully installed this as per your instructions and not matter whether I use PS or PS administrator or PS ISE or PS ISE admin - there is just nothing! I'm thinking there must be some step that connects what I've downloaded to the PS - I'm on the verge of just deleting this as I'm on a wild goose chase trying to get this to work.
The new docker compose
command integrates docker-compose
into the main docker
command. See https://docs.docker.com/compose/cli-command/ for details.
I realize this is asking for basically a whole other application to be integrated, so this might not be worth the effort, but discovered this when I installed this module today.
I have to import DockerCompletion module everytime I open PS. Is there a way to schedule the import so that I don't have to manually import everytime I open PS?
I've followed the quick steps of installing DockerCompletion and although sometimes it works properly, other times autocomplete populates with values from the directory instead of docker command context. For example if I try to run docker network disconnect
and try to Tab or Ctrl+Space, I get file values from the current path instead.
Hello, I try to do this but I am at my company computer and cannot install this because running scripts are disabled on my system.
Is there any work around for this? I get to the step Get-Module -ListAvailable DockerCompletion
without any problems when running powershell as admin but when I run the Import-Module DockerCompletion
command I get
Import-Module : File C:\Users\{{User}}\Documents\WindowsPowerShell\Modules\DockerCompletion\NativeCommandCompletio
n\NativeCommandCompletion.psm1 cannot be loaded because running scripts is disabled on this system. For more
information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ Import-Module DockerCompletion
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [Import-Module], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess,Microsoft.PowerShell.Commands.ImportModuleCommand
Delete the current demo and create a new one.
docker
as the name of docker clid
as the alias of docker cli (in this case, add an another file like "demo-alias.gif")I use an alias for docker:
New-Alias d docker
When I use my alias the completion doesn't work anymore.
Do you know what should I have to modify to have the completion working with my alias?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.