zsh-vi-mode icon indicating copy to clipboard operation
zsh-vi-mode copied to clipboard

feat: implement getter and setter for CUTBUFFER (For example, interaction with the system clipboard)

Open MuXiu1997 opened this issue 1 year ago • 1 comments

I'm considering wrapping the CUTBUFFER into getter and setter functions. This approach might minimize the extent of changes required in the existing code while also allowing other users to override these two functions to fulfill their own needs, such as interacting with the system clipboard.

For example:

# CUTBUFFER getter
function zvm_get_cutbuffer() {
  pbpaste
}

# CUTBUFFER setter
function zvm_set_cutbuffer() {
  echo -n $1 | pbcopy
}

  • Close #216

MuXiu1997 avatar Aug 30 '23 13:08 MuXiu1997

@jeffreytse I hope to receive your advice and response.

MuXiu1997 avatar Aug 30 '23 14:08 MuXiu1997