chore(zsh): remove unused zsh aliases and scripts
This commit is contained in:
@@ -11,7 +11,6 @@ alias dcp="docker compose ps --format 'table {{.Name}}\t{{.Ports}}'"
|
||||
|
||||
# navigation
|
||||
alias cdgit="cd $GGROOT"
|
||||
alias temp="cd $HOME/Desktop/temp"
|
||||
|
||||
# git
|
||||
alias gpo="git push origin"
|
||||
@@ -19,12 +18,5 @@ alias gros="git reset origin/$(git_current_branch) --soft"
|
||||
alias gcan="git commit -v --amend --no-edit"
|
||||
alias glogaa="git log --oneline --graph --all --pretty=format:\"%C(auto)%h %C(blue)(%aL/%cL)%C(auto)%(decorate) %s%Creset\""
|
||||
|
||||
# unsorted
|
||||
alias ci="glab ci list"
|
||||
alias bm=batman
|
||||
alias grow="~/.local/bin/cbonsai -liWC -M 15 -t 2 -w 60 -s $(date +%s)"
|
||||
# ruff
|
||||
alias ruffme="ruff check --fix && ruff format"
|
||||
|
||||
# clipboard
|
||||
alias xcp="xclip -selection c"
|
||||
|
||||
@@ -1,73 +1,3 @@
|
||||
function afm {
|
||||
RES=$(curl -s "https://$1/api/monitoring/requirements")
|
||||
COUNT=$(echo "$RES" | grep -c $2)
|
||||
if [[ $COUNT -ge 0 ]]; then
|
||||
VER=$(echo "$RES" | jq '.[] | select(.name | contains("'"$2"'")).version')
|
||||
# OP=$(echo "$RES" | jq '.[] | select(.name | contains("'"$2"'")).requirement?[0][0]')
|
||||
# echo "$2""$(echo "$OP" | tr -d '"')""$(echo "$VER" | tr -d '"')"
|
||||
echo "${2}==$(echo "$VER" | tr -d '"')"
|
||||
fi
|
||||
}
|
||||
|
||||
function nukepip {
|
||||
pip uninstall $(pip freeze) -y
|
||||
pip install -r $(pyenv root)/default-packages
|
||||
}
|
||||
|
||||
function pyinit {
|
||||
if [[ -f .python-version ]]; then
|
||||
echo "found .python-version, stopping"
|
||||
return
|
||||
fi
|
||||
|
||||
DIRNAME=$(basename "$PWD")
|
||||
|
||||
if [[ $(pyenv versions | grep -E "/${DIRNAME}$") ]]; then
|
||||
echo "found existing version with this name, setting..."
|
||||
pyenv local "$DIRNAME"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ -z $1 ]]; then
|
||||
echo "no python version provided, defaulting to $(pyenv version-name)"
|
||||
VERSION=$(pyenv version-name)
|
||||
else
|
||||
VERSION=$1
|
||||
fi
|
||||
|
||||
pyenv virtualenv "$VERSION" "$DIRNAME"
|
||||
pyenv local "$DIRNAME"
|
||||
|
||||
}
|
||||
|
||||
function lh {
|
||||
if [[ -z $1 ]]; then
|
||||
PORT=7999
|
||||
else
|
||||
PORT=$1
|
||||
fi
|
||||
|
||||
xdg-open "http://localhost:$PORT"
|
||||
}
|
||||
|
||||
function dps {
|
||||
if [[ -z $1 ]]; then
|
||||
docker ps --format table'{{ .ID }}\t{{ .Image }}\t{{ .Ports}}\t{{ .Names }}'
|
||||
else
|
||||
docker ps --format table'{{ .ID }}\t{{ .Image }}\t{{ .Ports}}\t{{ .Names }}' | grep $1
|
||||
fi
|
||||
}
|
||||
|
||||
function tssh {
|
||||
if [[ -z $1 ]]; then
|
||||
echo "provide ssh host"
|
||||
return
|
||||
fi
|
||||
|
||||
ssh -t "$@" "command -v tmux && (tmux a || tmux new-session -s gorazd -c ~) || bash"
|
||||
}
|
||||
|
||||
|
||||
function tmux_attach {
|
||||
tmux_running=$(pgrep tmux)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user