Code Monkey home page Code Monkey logo

dockercompletion's People

Contributors

giggio avatar matt9ucci avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dockercompletion's Issues

Installation not working

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

How to improve Import-Module in $PROFILE ?

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.

Completions for docker compose shorthand

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.

Integration of a PowerShell Module with DockerCompletion

Integration of a PowerShell Module with DockerCompletion

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.

Potential for Synergy

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.

Key Questions

  • Is there a recommended approach to achieve this?
  • Could DockerCompletion implement a function or hook to facilitate such an integration?

Current Attempt

I am currently trying to do this (but it is not ideal for me to modify your source code):
image

Seeking Advice

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.

Acknowledgments

Thank you for your dedication to developing DockerCompletion, and I hope my contribution can further enrich this tool.

Best regards,
IsWladi

How to get started on Windows 10

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.

Add Support for Compose V2

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.

Add completer: network disconnect

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.
autocomplete_incorrect
autocomplete_incorrect2

Execution policy error when running Import-Module cmdlet

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

New GIF demo

Delete the current demo and create a new one.

Requirements

Mandatory

  • Use PowerShell Core, not ISE
  • Use docker as the name of docker cli
  • Show completion for management commands
  • Show completion for subcommands
  • Show completion for options
  • Show completion for command/option arguments

Optional

  • Use d as the alias of docker cli (in this case, add an another file like "demo-alias.gif")
  • Show "Tab" being pressed at least once to clarify how to trigger completion
  • Show "Ctrl + Space" being pressed at least once to clarify how to trigger completion as a list

Alias for docker

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.