K9s: Copy current selection to clipboard doesn't work

Created on 17 Sep 2019  路  2Comments  路  Source: derailed/k9s






Describe the bug
Nothing happens when I use 'c' to copy.

To Reproduce
Steps to reproduce the behavior:

  1. Go to cluster
  2. Select any pod
  3. Press '.c'
  4. Nothing happens

Expected behavior
Simply copy:

func (v *resourceView) cpCmd(evt *tcell.EventKey) *tcell.EventKey {
    if !v.masterPage().RowSelected() {
        return evt
    }

    _, n := namespaced(v.masterPage().GetSelectedItem())
    log.Debug().Msgf("Copied selection to clipboard %q", n)
    v.app.Flash().Info("Current selection copied to clipboard...")
    clipboard.WriteAll(n)

    return nil
}

Versions:

  • OS: [Tested on: archlinux kernel-5.2.14; fedora 30 kernel-5.2.9; ubuntu 18.04 kernel-5.0.0 ]
  • K9s: [dev; 0.8.4]
  • K8s: [1.12.7; 1.13.9]
  • SHELL: [zsh; bash]
bug

Most helpful comment

(I am a coworker of @raphaunix)

Apparently, the clipboard package has some dependencies and since we didn't have these installed it was erroring out without further notice. I have create a PR that adds a error message to improve the user experience.

Here is an example when you don't have the needed tools available:
image

All 2 comments

(I am a coworker of @raphaunix)

Apparently, the clipboard package has some dependencies and since we didn't have these installed it was erroring out without further notice. I have create a PR that adds a error message to improve the user experience.

Here is an example when you don't have the needed tools available:
image

@raphaunix @paivagustavo Thank you so much for this report!
@paivagustavo I'll take a look at the PR and see what's up with that. Thank you for your contributions!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

signaleleven picture signaleleven  路  3Comments

krysopath picture krysopath  路  3Comments

dalgibbard picture dalgibbard  路  3Comments

mimizone picture mimizone  路  4Comments

brentco picture brentco  路  4Comments