3 ms·
That's all fine, but why not use kubectl's excellent tab completion? kubectl delete pod <tab> and it lists the pods. For bash or zsh: source <(kubec
by oftenwrong 6y ago
That's all fine, but why not use kubectl's excellent tab completion?
kubectl delete pod <tab>
and it lists the pods.
For bash or zsh:
source <(kubectl completion $(basename $SHELL))
- jcard 6y agoThat's a fair point! The kubernetes example I gave is somewhat contrived, but I will say that I prefer to have whatever resource id I'm working with in my clipboard vs. relying on myself to select the correct one in a tab completion menu. Where I really like this tmux copy/paste workflow is for grabbing multiple lines of command output. From there I can paste that into some message on slack, or use it as the body of a PR message that describes some error or shows some output. For the latter case, I have a zsh function that calls `hub` to open a PR, drops me off into vim, and once I `:wq`, it will send the API request to open the PR, and then open my browser up to it. This is the command I have in the function: `hub pull-request --push --file "$filename" --browse --draft`.