mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-19 00:37:35 +08:00
Compare commits
6 Commits
83f7d72be7
...
6aa7636c97
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6aa7636c97 | ||
|
|
a79b37b954 | ||
|
|
3ce427d196 | ||
|
|
7bdca23779 | ||
|
|
32b4d285c3 | ||
|
|
44f7c5798e |
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 |
|
||||
|
||||
@ -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'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user