Skip to content

Conversation

@rtim75
Copy link
Contributor

@rtim75 rtim75 commented Mar 27, 2024

Closes #2617

This allows plugin developers to overwrite standard Plugin command launched successfully: "Command completed successfully:..... with their custom messages.

I have a plugin that finds all ingress hosts and saves them in MacOS clipboard:

plugins:
  copy-ingress-hosts:
    shortCut: h
    confirm: false
    overwriteOutput: true
    description: Copy ingress hosts
    scopes:
      - ingresses
    command: sh
    background: true
    args:
      - -c
      - >-
        kubectl --context $CONTEXT
        get ingress -n $NAMESPACE $NAME
        -o go-template='{{range .spec.rules}}{{.host}},{{end}}' | sed 's/,$//' | pbcopy && echo "Successfully copied hosts"

with overwriteOutput: true when I execute the plugin I receive Successfully copied hosts:

CleanShot 2024-03-27 at 15 48 41@2x

@rtim75 rtim75 marked this pull request as draft March 27, 2024 14:09
@rtim75 rtim75 marked this pull request as ready for review March 27, 2024 14:29
Copy link
Owner

@derailed derailed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rtim75 Nice! Thank you for this update!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin command execeution output

2 participants