1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-01-19 00:37:35 +08:00

Compare commits

...

6 Commits

Author SHA1 Message Date
zwyyy456
6aa7636c97
Merge 3ce427d196 into a79b37b954 2026-01-04 00:02:09 +05:30
Marc Cornellà
a79b37b954 Revert "fix(kubectl)!: change alias from kl to klog (#13204)"
This reverts commit 475b18f39a.
2025-12-30 09:48:43 +01:00
zwy
3ce427d196 feat(clipboard, copybuffer): fix typo, add 'yy' to yank buffer in vi-normal mode 2024-12-29 22:10:23 +09:00
zwy
7bdca23779 Merge remote-tracking branch 'zwyyy/master' 2024-12-29 22:08:15 +09:00
zwyyy456
32b4d285c3 fix(typo): make the name of local varialbe more readable 2024-12-29 17:07:13 +08:00
zwyyy456
44f7c5798e feat(clipboard): add simple osc52 support 2024-12-29 16:47:56 +08:00
4 changed files with 14 additions and 2 deletions

View File

@ -84,6 +84,17 @@ function detect-clipboard() {
elif [ -n "${TMUX:-}" ] && (( ${+commands[tmux]} )); then
function clipcopy() { tmux load-buffer -w "${1:--}"; }
function clippaste() { tmux save-buffer -; }
elif [[ "$TERM" == "xterm"* || "$TERM" == "screen"* || "$TERM" == "tmux"* ]]; then
# OSC 52 support
function clipcopy() {
local content_tocopy
content_tocopy=$(cat "${1:-/dev/stdin}" | base64 | tr -d '\n')
printf "\033]52;c;%s\a" "$content_tocopy" > /dev/tty
}
function clippaste() {
echo "OSC 52 does not support pasting from the clipboard."
return 1
}
else
function _retry_clipboard_detection_or_fail() {
local clipcmd="${1}"; shift

View File

@ -14,3 +14,4 @@ zle -N copybuffer
bindkey -M emacs "^O" copybuffer
bindkey -M viins "^O" copybuffer
bindkey -M vicmd "^O" copybuffer
bindkey -M vicmd "yy" copybuffer

View File

@ -90,7 +90,7 @@ plugins=(... kubectl)
| kga | `kubectl get all` | List all resources in ps format |
| kgaa | `kubectl get all --all-namespaces` | List the requested object(s) across all namespaces |
| | | **Logs** |
| klog | `kubectl logs` | Print the logs for a container or resource |
| kl | `kubectl logs` | Print the logs for a container or resource |
| klf | `kubectl logs -f` | Stream the logs for a container or resource (follow) |
| | | **File copy** |
| kcp | `kubectl cp` | Copy files and directories to and from containers |

View File

@ -135,7 +135,7 @@ alias kga='kubectl get all'
alias kgaa='kubectl get all --all-namespaces'
# Logs
alias klog='kubectl logs'
alias kl='kubectl logs'
alias kl1h='kubectl logs --since 1h'
alias kl1m='kubectl logs --since 1m'
alias kl1s='kubectl logs --since 1s'