Skip to content

Commit

Permalink
Improve pod_ssh and git aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
mileszs committed Aug 9, 2023
1 parent d7cd508 commit 05d23d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions zsh/funcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ function rserv()
function pod_ssh {
if [[ $1 == "production" ]]
then
kubectl config use-context production-1-26
kubectl config use-context production-1-27
elif [[ $1 == "staging" ]]
then
kubectl config use-context staging-1-26
kubectl config use-context staging-1-27
else
kubectl config use-context testing-1-26
kubectl config use-context testing-1-27
fi

POD_ID=$(kubectl get pods --field-selector=status.phase=Running | grep -m1 -E "$1-.{9,10}-" | awk '{print $1}')
Expand Down
3 changes: 2 additions & 1 deletion zsh/git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ alias gm='git merge'
alias gp='git pull'
alias gpa='git pull --all'
alias gpp='gp && git push origin `current_git_branch`'
alias push='git push origin `current_git_branch`'
alias push='git push -u origin `current_git_branch`'
alias gprp='gp && rake && gpp'
alias gri='git rebase -i origin/master^'
alias grc='git rebase --continue'
Expand All @@ -48,6 +48,7 @@ alias gb='git branch'
# complete -o default -o nospace -F _git_branch gb

alias gtrack='git branch --track'
alias gtracksame='git branch --set-upstream-to=origin/`current_git_branch` `current_git_branch`'

alias gcb='git checkout -b'
# complete -o default -o nospace -F _git_branch gcb
Expand Down

0 comments on commit 05d23d5

Please sign in to comment.