Yank doesn't clear the killring, so it gets cluttered after a while. Can I clear it?I'm using Oh My Zsh.
can I clear current killring in zsh?
zsh;oh my zsh
The size of the kill ring is determined by the length of the killring array. This is 8 by default.The variable is only available in zle widgets, so you can't manipulate it on the command line, you have to define a widget and invoke it either through a key binding or through M-x. Here's an example of a widget that blanks the killring.set_killring_size () {  local empty=  if ((!$+NUMERIC)); then    # Wipe killring and re-create it to its current size    NUMERIC=$#killring    killring=()  fi  if ((NUMERIC <= $#killring)); then    # Truncate killring to the specified size    killring=(${(@)killring[1,$NUMERIC]})  else    # Grow killring to the specified size    killring=(${(@)killring} ${(@s:_:)${(l:$((NUMERIC-$#killring-1))::_:)empty}})  fi}zle -N set_killring_size set-killring-sizeCall this widget with no argument to wipe the killring: M-x set-killring-size RET. Call it with a numeric prefix to set the killring size: ESC 4 2 M-x set-killring-size RET.