From 2d8685c8e4981ea0438d0393893328251b3074c3 Mon Sep 17 00:00:00 2001 From: ange Date: Tue, 2 Jul 2024 14:26:32 +0200 Subject: [PATCH] fix(bash): alias completion --- .bashrc | 2 + .config/bash/00-compalias.bash | 19 ++ .../bash/{aliases.bash => 10-aliases.bash} | 63 +++---- .config/bash/10-docker.bash | 69 ++++++++ .config/bash/10-git.bash | 33 ++++ .config/bash/10-k8s.bash | 162 ++++++++++++++++++ .config/bash/{theme.bash => 20-theme.bash} | 0 .config/bash/docker.bash | 69 -------- .config/bash/git.bash | 32 ---- .config/bash/k8s.bash | 161 ----------------- .config/newsraft/feeds | 6 +- .config/nvim/pack/plugins/opt/telescope | 2 +- .config/nvim/pack/plugins/opt/treesitter | 2 +- .inputrc | 11 +- .local/share/bash-completion/completions/doas | 1 - .local/share/bash-completion/completions/k | 2 - .local/share/bash-completion/completions/kctx | 3 +- .local/share/bash-completion/completions/kns | 3 +- .local/share/bash-completion/completions/pac | 2 + 19 files changed, 332 insertions(+), 310 deletions(-) create mode 100644 .config/bash/00-compalias.bash rename .config/bash/{aliases.bash => 10-aliases.bash} (53%) create mode 100644 .config/bash/10-docker.bash create mode 100644 .config/bash/10-git.bash create mode 100644 .config/bash/10-k8s.bash rename .config/bash/{theme.bash => 20-theme.bash} (100%) delete mode 100644 .config/bash/docker.bash delete mode 100644 .config/bash/git.bash delete mode 100644 .config/bash/k8s.bash delete mode 100644 .local/share/bash-completion/completions/doas delete mode 100644 .local/share/bash-completion/completions/k create mode 100644 .local/share/bash-completion/completions/pac diff --git a/.bashrc b/.bashrc index 87fc9dc..ff03dbc 100644 --- a/.bashrc +++ b/.bashrc @@ -11,3 +11,5 @@ for f in "$HOME/.config/bash/"*.bash; do # shellcheck disable=SC1090 . "$f" done + +stty werase undef diff --git a/.config/bash/00-compalias.bash b/.config/bash/00-compalias.bash new file mode 100644 index 0000000..e5e6bdc --- /dev/null +++ b/.config/bash/00-compalias.bash @@ -0,0 +1,19 @@ +function _compalias() { + local name val valarr fn + name="${COMP_WORDS[0]}" + val="${BASH_ALIASES[$name]}" + [ -z "$val" ] && return 1 + + read -r -a valarr <<< "$val" + COMP_WORDS=("${valarr[@]}" "${COMP_WORDS[@]:1}") + COMP_LINE="${COMP_LINE//$name/$val}" + COMP_CWORD="$((${#COMP_WORDS[@]} - 1))" + COMP_POINT="${#COMP_LINE}" + fn="$(complete -p "${COMP_WORDS[0]}" | grep -Po -- '-F\s+\K\w+')" + "$fn" "${COMP_WORDS[0]}" "${COMP_WORDS[-1]}" "${COMP_WORDS[-2]}" +} + +function compalias() { + builtin alias "$@" + complete -o nospace -F _compalias "${@%%=*}" +} diff --git a/.config/bash/aliases.bash b/.config/bash/10-aliases.bash similarity index 53% rename from .config/bash/aliases.bash rename to .config/bash/10-aliases.bash index ec56648..044fd3e 100644 --- a/.config/bash/aliases.bash +++ b/.config/bash/10-aliases.bash @@ -4,52 +4,41 @@ function update() { $TERM --hold -e "$SHELL" -ic "config submodule update --remote --recursive && echo -e '\e[32mDONE'" & } -alias pac='sudo pacman' -alias neofetch=fastfetch -alias mail=aerc -alias rss=newsraft - -alias vi='$EDITOR' - -alias qcp='qcp -o tabsize=4' \ - qmv='qmv -o tabsize=4' - -alias config='git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"' \ - viconf='(cd "$XDG_CONFIG_HOME/nvim" && $EDITOR .)' - -alias ssh='TERM=xterm-256color ssh' - -alias sudo='sudo ' \ - watch='watch -c ' \ - xargs='xargs ' - function tmp() { cd "$(mktemp -d --tmpdir "$1"XXX)" || return } +function bd() { + echo - "$@" | base64 -d; echo +} + alias ...='../..' \ ....='../../..' \ .....='../../../..' \ - ......='../../../../..' - -alias cp='cp -vi' \ + ......='../../../../..' \ + cp='cp -vi' \ mv='mv -vi' \ rm='rm -vI' \ mkdir='mkdir -v' \ - rsync='rsync -P' - -alias ls='ls --color=auto' \ + rsync='rsync -P' \ + ls='ls --color=auto' \ ll='ls -lh' \ l='ll -a' \ - la='ll -A' - -alias diff='diff --color' \ - grep='grep --color --exclude-dir={.cache,.git,.idea,.venv,.vscode,node_modules}' - -alias feh='feh --auto-zoom --scale-down' - -alias xmr='monero-wallet-cli --daemon-address monero.maby.dev:18081 --trusted-daemon --log-file=/tmp/monero-wallet-cli.log --wallet-file /home/ange/.config/monero/ange' - -function bd() { - echo - "$@" | base64 -d; echo -} + la='ll -A' \ + diff='diff --color' \ + grep='grep --color --exclude-dir={.cache,.git,.idea,.venv,.vscode,node_modules}' \ + pac='sudo pacman' \ + neofetch=fastfetch \ + mail=aerc \ + rss=newsraft \ + vi='$EDITOR' \ + qcp='qcp -o tabsize=4' \ + qmv='qmv -o tabsize=4' \ + config='git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"' \ + viconf='(cd "$XDG_CONFIG_HOME/nvim" && $EDITOR .)' \ + ssh='TERM=xterm-256color ssh' \ + sudo='sudo ' \ + watch='watch -c ' \ + xargs='xargs ' \ + feh='feh --auto-zoom --scale-down' \ + xmr='monero-wallet-cli --daemon-address monero.maby.dev:18081 --trusted-daemon --log-file=/tmp/monero-wallet-cli.log --wallet-file /home/ange/.config/monero/ange' diff --git a/.config/bash/10-docker.bash b/.config/bash/10-docker.bash new file mode 100644 index 0000000..a0688e9 --- /dev/null +++ b/.config/bash/10-docker.bash @@ -0,0 +1,69 @@ +compalias dk='docker' \ + dkb='docker build . -t' \ + dkc='docker container' \ + dkcc='docker container create' \ + dkci='docker container inspect' \ + dkcls='docker container ls' \ + dkclsa='docker container ls -a' \ + dkclsaq='docker container ls -a -q' \ + dkclsq='docker container ls -q' \ + dkcrm!='docker container rm -f' \ + dkcrm='docker container rm' \ + dkcsp='docker container stop' \ + dkcst='docker container restart' \ + dkex='docker container exec -i -t' \ + dki='docker image' \ + dkic='docker image create' \ + dkii='docker image inspect' \ + dkil='docker pull' \ + dkils='docker image ls' \ + dkilsa='docker image ls -a' \ + dkilsaq='docker image ls -a -q' \ + dkilsq='docker image ls -q' \ + dkip='docker image push' \ + dkirm!='docker image rm -f' \ + dkirm='docker image rm' \ + dkis='docker image save' \ + dkit='docker image tag' \ + dklo='docker logs -f' \ + dkn='docker network' \ + dknc='docker network create' \ + dkni='docker network inspect' \ + dknls='docker network ls' \ + dknlsq='docker network ls -q' \ + dknrm!='docker network rm -f' \ + dknrm='docker network rm' \ + dkr='docker run -i -t' \ + dksys='docker system' \ + dksysdf='docker system df' \ + dksysp!='docker system prune -f' \ + dksysp='docker system prune' \ + dktop='docker top' \ + dkv='docker volume' \ + dkvc='docker volume create' \ + dkvi='docker volume inspect' \ + dkvls='docker volume ls' \ + dkvlsq='docker volume ls -q' \ + dkvrm!='docker volume rm -f' \ + dkvrm='docker volume rm' + +compalias dc='docker-compose' \ + dcb!='docker-compose build --no-cache' \ + dcb='docker-compose build' \ + dccls='docker-compose ps' \ + dcclsq='docker-compose ps -q' \ + dcd='docker-compose down' \ + dcex='docker-compose exec' \ + dcl='docker-compose pull' \ + dcr='docker-compose run --rm' \ + dcrd='docker-compose run -d --rm' \ + dcrm!='docker-compose rm -f' \ + dcrm='docker-compose rm' \ + dcrmv!='docker-compose rm -v -f' \ + dcrmv='docker-compose rm -v' \ + dcsp='docker-compose stop' \ + dcst='docker-compose restart' \ + dcup='docker-compose up' \ + dcupb='docker-compose up --build' \ + dcupd='docker-compose up -d' \ + dcupdb='docker-compose up -d --build' diff --git a/.config/bash/10-git.bash b/.config/bash/10-git.bash new file mode 100644 index 0000000..f58992a --- /dev/null +++ b/.config/bash/10-git.bash @@ -0,0 +1,33 @@ +function gi() { + local IFS=, + + curl -fL "https://www.toptal.com/developers/gitignore/api/$*" +} + +. /usr/share/bash-completion/completions/git +compalias g='git' \ + ga='git add' \ + gaa='git add --all' \ + gap='git apply' \ + gb='git branch' \ + gbl='git blame -w' \ + gbs='git bisect' \ + gc='git commit --verbose' \ + gca='git commit --verbose --all' \ + gcl='git clone' \ + gco='git checkout' \ + gcp='git cherry-pick' \ + gd='git diff' \ + gdup='git diff @{upstream}' \ + gf='git fetch' \ + gl='git pull' \ + glo='git log --oneline --decorate' \ + gmr='git merge' \ + gp='git push' \ + gr='git remote' \ + grb='git rebase' \ + grev='git revert' \ + grh='git reset' \ + grs='git restore' \ + gst='git status' \ + gsta='git stash' diff --git a/.config/bash/10-k8s.bash b/.config/bash/10-k8s.bash new file mode 100644 index 0000000..235990a --- /dev/null +++ b/.config/bash/10-k8s.bash @@ -0,0 +1,162 @@ +function kns() { + local cache="$HOME/.local/state/${FUNCNAME[0]}" + + if [ -n "$1" ]; then + if ! kubectl get namespace -o name | grep -q "^namespace/$1\$"; then + echo "error: no namespace exists with the name: \"$1\"" >&2 + return 1 + fi + kubectl config set-context --current --namespace "$1" > /dev/null + else + if [ "${KUBECONFIG:-"$HOME/.kube/config"}" -nt "$cache" ]; then + set -- "$(kubectl config view --minify -o jsonpath='{..namespace}')" + else + cat "$cache" + return + fi + fi + tee "$cache" <<< "$1" +} + +function kctx() { + local cache="$HOME/.local/state/${FUNCNAME[0]}" + + if [ -n "$1" ]; then + kubectl config use-context "$1" > /dev/null || return + else + if [ "${KUBECONFIG:-"$HOME/.kube/config"}" -nt "$cache" ]; then + set -- "$(kubectl config current-context)" + else + cat "$cache" + return + fi + fi + tee "$cache" <<< "$1" +} + +alias kga='kubectl get "$(kubectl api-resources --verbs=list --namespaced -oname | grep -v event | paste -sd,)"' + +. /usr/share/bash-completion/completions/kubectl +compalias k=kubectl \ + ka='kubectl apply --recursive -f' \ + kd='kubectl describe' \ + kdcj='kubectl describe cronjob' \ + kdcm='kubectl describe configmap' \ + kddep='kubectl describe deployment' \ + kding='kubectl describe ingress' \ + kdj='kubectl describe job' \ + kdno='kubectl describe node' \ + kdns='kubectl describe namespace' \ + kdpo='kubectl describe pod' \ + kdpvc='kubectl describe persistentvolumeclaim' \ + kdsec='kubectl describe secret' \ + kdsts='kubectl describe statefulset' \ + kdsvc='kubectl describe service' \ + kex='kubectl exec -i -t' \ + kg='kubectl get' \ + kgall='kubectl get --all-namespaces' \ + kgalloname='kubectl get --all-namespaces -o name' \ + kgallowide='kubectl get --all-namespaces -o wide' \ + kgalloyaml='kubectl get --all-namespaces -o yaml' \ + kgcj='kubectl get cronjob' \ + kgcjall='kubectl get cronjob --all-namespaces' \ + kgcjalloname='kubectl get cronjob --all-namespaces -o name' \ + kgcjallowide='kubectl get cronjob --all-namespaces -o wide' \ + kgcjalloyaml='kubectl get cronjob --all-namespaces -o yaml' \ + kgcjoname='kubectl get cronjob -o name' \ + kgcjowide='kubectl get cronjob -o wide' \ + kgcjoyaml='kubectl get cronjob -o yaml' \ + kgcm='kubectl get configmap' \ + kgcmall='kubectl get configmap --all-namespaces' \ + kgcmalloname='kubectl get configmap --all-namespaces -o name' \ + kgcmallowide='kubectl get configmap --all-namespaces -o wide' \ + kgcmalloyaml='kubectl get configmap --all-namespaces -o yaml' \ + kgcmoname='kubectl get configmap -o name' \ + kgcmowide='kubectl get configmap -o wide' \ + kgcmoyaml='kubectl get configmap -o yaml' \ + kgdep='kubectl get deployment' \ + kgdepall='kubectl get deployment --all-namespaces' \ + kgdepalloname='kubectl get deployment --all-namespaces -o name' \ + kgdepallowide='kubectl get deployment --all-namespaces -o wide' \ + kgdepalloyaml='kubectl get deployment --all-namespaces -o yaml' \ + kgdeponame='kubectl get deployment -o name' \ + kgdepowide='kubectl get deployment -o wide' \ + kgdepoyaml='kubectl get deployment -o yaml' \ + kging='kubectl get ingress' \ + kgingall='kubectl get ingress --all-namespaces' \ + kgingalloname='kubectl get ingress --all-namespaces -o name' \ + kgingallowide='kubectl get ingress --all-namespaces -o wide' \ + kgingalloyaml='kubectl get ingress --all-namespaces -o yaml' \ + kgingoname='kubectl get ingress -o name' \ + kgingowide='kubectl get ingress -o wide' \ + kgingoyaml='kubectl get ingress -o yaml' \ + kgj='kubectl get job' \ + kgjall='kubectl get job --all-namespaces' \ + kgjalloname='kubectl get job --all-namespaces -o name' \ + kgjallowide='kubectl get job --all-namespaces -o wide' \ + kgjalloyaml='kubectl get job --all-namespaces -o yaml' \ + kgjoname='kubectl get job -o name' \ + kgjowide='kubectl get job -o wide' \ + kgjoyaml='kubectl get job -o yaml' \ + kgno='kubectl get node' \ + kgns='kubectl get namespace' \ + kgnsoname='kubectl get namespace -o name' \ + kgnsowide='kubectl get namespace -o wide' \ + kgnsoyaml='kubectl get namespace -o yaml' \ + kgoname='kubectl get -o name' \ + kgowide='kubectl get -o wide' \ + kgoyaml='kubectl get -o yaml' \ + kgpo='kubectl get pod' \ + kgpoall='kubectl get pod --all-namespaces' \ + kgpoalloname='kubectl get pod --all-namespaces -o name' \ + kgpoallowide='kubectl get pod --all-namespaces -o wide' \ + kgpoalloyaml='kubectl get pod --all-namespaces -o yaml' \ + kgpooname='kubectl get pod -o name' \ + kgpoowide='kubectl get pod -o wide' \ + kgpooyaml='kubectl get pod -o yaml' \ + kgpvc='kubectl get persistentvolumeclaim' \ + kgpvcall='kubectl get persistentvolumeclaim --all-namespaces' \ + kgpvcalloname='kubectl get persistentvolumeclaim --all-namespaces -o name' \ + kgpvcallowide='kubectl get persistentvolumeclaim --all-namespaces -o wide' \ + kgpvcalloyaml='kubectl get persistentvolumeclaim --all-namespaces -o yaml' \ + kgpvconame='kubectl get persistentvolumeclaim -o name' \ + kgpvcowide='kubectl get persistentvolumeclaim -o wide' \ + kgpvcoyaml='kubectl get persistentvolumeclaim -o yaml' \ + kgsec='kubectl get secret' \ + kgsecall='kubectl get secret --all-namespaces' \ + kgsecalloname='kubectl get secret --all-namespaces -o name' \ + kgsecallowide='kubectl get secret --all-namespaces -o wide' \ + kgsecalloyaml='kubectl get secret --all-namespaces -o yaml' \ + kgseconame='kubectl get secret -o name' \ + kgsecowide='kubectl get secret -o wide' \ + kgsecoyaml='kubectl get secret -o yaml' \ + kgsts='kubectl get statefulset' \ + kgstsall='kubectl get statefulset --all-namespaces' \ + kgstsalloname='kubectl get statefulset --all-namespaces -o name' \ + kgstsallowide='kubectl get statefulset --all-namespaces -o wide' \ + kgstsalloyaml='kubectl get statefulset --all-namespaces -o yaml' \ + kgstsoname='kubectl get statefulset -o name' \ + kgstsowide='kubectl get statefulset -o wide' \ + kgstsoyaml='kubectl get statefulset -o yaml' \ + kgsvc='kubectl get service' \ + kgsvcall='kubectl get service --all-namespaces' \ + kgsvcalloname='kubectl get service --all-namespaces -o name' \ + kgsvcallowide='kubectl get service --all-namespaces -o wide' \ + kgsvcalloyaml='kubectl get service --all-namespaces -o yaml' \ + kgsvconame='kubectl get service -o name' \ + kgsvcowide='kubectl get service -o wide' \ + kgsvcoyaml='kubectl get service -o yaml' \ + klo='kubectl logs' \ + kpf='kubectl port-forward' \ + krm='kubectl delete' \ + krmcj='kubectl delete cronjob' \ + krmcm='kubectl delete configmap' \ + krmdep='kubectl delete deployment' \ + krming='kubectl delete ingress' \ + krmj='kubectl delete job' \ + krmns='kubectl delete namespace' \ + krmpo='kubectl delete pod' \ + krmpvc='kubectl delete persistentvolumeclaim' \ + krmsec='kubectl delete secret' \ + krmsts='kubectl delete statefulset' \ + krmsvc='kubectl delete service' diff --git a/.config/bash/theme.bash b/.config/bash/20-theme.bash similarity index 100% rename from .config/bash/theme.bash rename to .config/bash/20-theme.bash diff --git a/.config/bash/docker.bash b/.config/bash/docker.bash deleted file mode 100644 index 753bd6b..0000000 --- a/.config/bash/docker.bash +++ /dev/null @@ -1,69 +0,0 @@ -alias dk='docker' \ - dkb='docker build . -t' \ - dkc='docker container' \ - dkcc='docker container create' \ - dkci='docker container inspect' \ - dkcls='docker container ls' \ - dkclsa='docker container ls -a' \ - dkclsaq='docker container ls -a -q' \ - dkclsq='docker container ls -q' \ - dkcrm!='docker container rm -f' \ - dkcrm='docker container rm' \ - dkcsp='docker container stop' \ - dkcst='docker container restart' \ - dkex='docker container exec -i -t' \ - dki='docker image' \ - dkic='docker image create' \ - dkii='docker image inspect' \ - dkil='docker pull' \ - dkils='docker image ls' \ - dkilsa='docker image ls -a' \ - dkilsaq='docker image ls -a -q' \ - dkilsq='docker image ls -q' \ - dkip='docker image push' \ - dkirm!='docker image rm -f' \ - dkirm='docker image rm' \ - dkis='docker image save' \ - dkit='docker image tag' \ - dklo='docker logs -f' \ - dkn='docker network' \ - dknc='docker network create' \ - dkni='docker network inspect' \ - dknls='docker network ls' \ - dknlsq='docker network ls -q' \ - dknrm!='docker network rm -f' \ - dknrm='docker network rm' \ - dkr='docker run -i -t' \ - dksys='docker system' \ - dksysdf='docker system df' \ - dksysp!='docker system prune -f' \ - dksysp='docker system prune' \ - dktop='docker top' \ - dkv='docker volume' \ - dkvc='docker volume create' \ - dkvi='docker volume inspect' \ - dkvls='docker volume ls' \ - dkvlsq='docker volume ls -q' \ - dkvrm!='docker volume rm -f' \ - dkvrm='docker volume rm' - -alias dc='docker-compose' \ - dcb!='docker-compose build --no-cache' \ - dcb='docker-compose build' \ - dccls='docker-compose ps' \ - dcclsq='docker-compose ps -q' \ - dcd='docker-compose down' \ - dcex='docker-compose exec' \ - dcl='docker-compose pull' \ - dcr='docker-compose run --rm' \ - dcrd='docker-compose run -d --rm' \ - dcrm!='docker-compose rm -f' \ - dcrm='docker-compose rm' \ - dcrmv!='docker-compose rm -v -f' \ - dcrmv='docker-compose rm -v' \ - dcsp='docker-compose stop' \ - dcst='docker-compose restart' \ - dcup='docker-compose up' \ - dcupb='docker-compose up --build' \ - dcupd='docker-compose up -d' \ - dcupdb='docker-compose up -d --build' diff --git a/.config/bash/git.bash b/.config/bash/git.bash deleted file mode 100644 index 94e1be3..0000000 --- a/.config/bash/git.bash +++ /dev/null @@ -1,32 +0,0 @@ -function gi() { - local IFS=, - - curl -fL "https://www.toptal.com/developers/gitignore/api/$*" -} - -alias g='git' \ - ga='git add' \ - gaa='git add --all' \ - gap='git apply' \ - gb='git branch' \ - gbl='git blame -w' \ - gbs='git bisect' \ - gc='git commit --verbose' \ - gca='git commit --verbose --all' \ - gcl='git clone' \ - gco='git checkout' \ - gcp='git cherry-pick' \ - gd='git diff' \ - gdup='git diff @{upstream}' \ - gf='git fetch' \ - gl='git pull' \ - glo='git log --oneline --decorate' \ - gmr='git merge' \ - gp='git push' \ - gr='git remote' \ - grb='git rebase' \ - grev='git revert' \ - grh='git reset' \ - grs='git restore' \ - gst='git status' \ - gsta='git stash' diff --git a/.config/bash/k8s.bash b/.config/bash/k8s.bash deleted file mode 100644 index e764e5e..0000000 --- a/.config/bash/k8s.bash +++ /dev/null @@ -1,161 +0,0 @@ -function kns() { - local cache="$HOME/.local/state/${FUNCNAME[0]}" - - if [ -n "$1" ]; then - if ! kubectl get namespace -o name | grep -q "^namespace/$1\$"; then - echo "error: no namespace exists with the name: \"$1\"" >&2 - return 1 - fi - kubectl config set-context --current --namespace "$1" > /dev/null - else - if [ "${KUBECONFIG:-"$HOME/.kube/config"}" -nt "$cache" ]; then - set -- "$(kubectl config view --minify -o jsonpath='{..namespace}')" - else - cat "$cache" - return - fi - fi - tee "$cache" <<< "$1" -} - -function kctx() { - local cache="$HOME/.local/state/${FUNCNAME[0]}" - - if [ -n "$1" ]; then - kubectl config use-context "$1" > /dev/null || return - else - if [ "${KUBECONFIG:-"$HOME/.kube/config"}" -nt "$cache" ]; then - set -- "$(kubectl config current-context)" - else - cat "$cache" - return - fi - fi - tee "$cache" <<< "$1" -} - -alias kga='kubectl get "$(kubectl api-resources --verbs=list --namespaced -oname | grep -v event | paste -sd,)"' - -alias k=kubectl \ - ka='kubectl apply --recursive -f' \ - kd='kubectl describe' \ - kdcj='kubectl describe cronjob' \ - kdcm='kubectl describe configmap' \ - kddep='kubectl describe deployment' \ - kding='kubectl describe ingress' \ - kdj='kubectl describe job' \ - kdno='kubectl describe node' \ - kdns='kubectl describe namespace' \ - kdpo='kubectl describe pod' \ - kdpvc='kubectl describe persistentvolumeclaim' \ - kdsec='kubectl describe secret' \ - kdsts='kubectl describe statefulset' \ - kdsvc='kubectl describe service' \ - kex='kubectl exec -i -t' \ - kg='kubectl get' \ - kgall='kubectl get --all-namespaces' \ - kgalloname='kubectl get --all-namespaces -o name' \ - kgallowide='kubectl get --all-namespaces -o wide' \ - kgalloyaml='kubectl get --all-namespaces -o yaml' \ - kgcj='kubectl get cronjob' \ - kgcjall='kubectl get cronjob --all-namespaces' \ - kgcjalloname='kubectl get cronjob --all-namespaces -o name' \ - kgcjallowide='kubectl get cronjob --all-namespaces -o wide' \ - kgcjalloyaml='kubectl get cronjob --all-namespaces -o yaml' \ - kgcjoname='kubectl get cronjob -o name' \ - kgcjowide='kubectl get cronjob -o wide' \ - kgcjoyaml='kubectl get cronjob -o yaml' \ - kgcm='kubectl get configmap' \ - kgcmall='kubectl get configmap --all-namespaces' \ - kgcmalloname='kubectl get configmap --all-namespaces -o name' \ - kgcmallowide='kubectl get configmap --all-namespaces -o wide' \ - kgcmalloyaml='kubectl get configmap --all-namespaces -o yaml' \ - kgcmoname='kubectl get configmap -o name' \ - kgcmowide='kubectl get configmap -o wide' \ - kgcmoyaml='kubectl get configmap -o yaml' \ - kgdep='kubectl get deployment' \ - kgdepall='kubectl get deployment --all-namespaces' \ - kgdepalloname='kubectl get deployment --all-namespaces -o name' \ - kgdepallowide='kubectl get deployment --all-namespaces -o wide' \ - kgdepalloyaml='kubectl get deployment --all-namespaces -o yaml' \ - kgdeponame='kubectl get deployment -o name' \ - kgdepowide='kubectl get deployment -o wide' \ - kgdepoyaml='kubectl get deployment -o yaml' \ - kging='kubectl get ingress' \ - kgingall='kubectl get ingress --all-namespaces' \ - kgingalloname='kubectl get ingress --all-namespaces -o name' \ - kgingallowide='kubectl get ingress --all-namespaces -o wide' \ - kgingalloyaml='kubectl get ingress --all-namespaces -o yaml' \ - kgingoname='kubectl get ingress -o name' \ - kgingowide='kubectl get ingress -o wide' \ - kgingoyaml='kubectl get ingress -o yaml' \ - kgj='kubectl get job' \ - kgjall='kubectl get job --all-namespaces' \ - kgjalloname='kubectl get job --all-namespaces -o name' \ - kgjallowide='kubectl get job --all-namespaces -o wide' \ - kgjalloyaml='kubectl get job --all-namespaces -o yaml' \ - kgjoname='kubectl get job -o name' \ - kgjowide='kubectl get job -o wide' \ - kgjoyaml='kubectl get job -o yaml' \ - kgno='kubectl get node' \ - kgns='kubectl get namespace' \ - kgnsoname='kubectl get namespace -o name' \ - kgnsowide='kubectl get namespace -o wide' \ - kgnsoyaml='kubectl get namespace -o yaml' \ - kgoname='kubectl get -o name' \ - kgowide='kubectl get -o wide' \ - kgoyaml='kubectl get -o yaml' \ - kgpo='kubectl get pod' \ - kgpoall='kubectl get pod --all-namespaces' \ - kgpoalloname='kubectl get pod --all-namespaces -o name' \ - kgpoallowide='kubectl get pod --all-namespaces -o wide' \ - kgpoalloyaml='kubectl get pod --all-namespaces -o yaml' \ - kgpooname='kubectl get pod -o name' \ - kgpoowide='kubectl get pod -o wide' \ - kgpooyaml='kubectl get pod -o yaml' \ - kgpvc='kubectl get persistentvolumeclaim' \ - kgpvcall='kubectl get persistentvolumeclaim --all-namespaces' \ - kgpvcalloname='kubectl get persistentvolumeclaim --all-namespaces -o name' \ - kgpvcallowide='kubectl get persistentvolumeclaim --all-namespaces -o wide' \ - kgpvcalloyaml='kubectl get persistentvolumeclaim --all-namespaces -o yaml' \ - kgpvconame='kubectl get persistentvolumeclaim -o name' \ - kgpvcowide='kubectl get persistentvolumeclaim -o wide' \ - kgpvcoyaml='kubectl get persistentvolumeclaim -o yaml' \ - kgsec='kubectl get secret' \ - kgsecall='kubectl get secret --all-namespaces' \ - kgsecalloname='kubectl get secret --all-namespaces -o name' \ - kgsecallowide='kubectl get secret --all-namespaces -o wide' \ - kgsecalloyaml='kubectl get secret --all-namespaces -o yaml' \ - kgseconame='kubectl get secret -o name' \ - kgsecowide='kubectl get secret -o wide' \ - kgsecoyaml='kubectl get secret -o yaml' \ - kgsts='kubectl get statefulset' \ - kgstsall='kubectl get statefulset --all-namespaces' \ - kgstsalloname='kubectl get statefulset --all-namespaces -o name' \ - kgstsallowide='kubectl get statefulset --all-namespaces -o wide' \ - kgstsalloyaml='kubectl get statefulset --all-namespaces -o yaml' \ - kgstsoname='kubectl get statefulset -o name' \ - kgstsowide='kubectl get statefulset -o wide' \ - kgstsoyaml='kubectl get statefulset -o yaml' \ - kgsvc='kubectl get service' \ - kgsvcall='kubectl get service --all-namespaces' \ - kgsvcalloname='kubectl get service --all-namespaces -o name' \ - kgsvcallowide='kubectl get service --all-namespaces -o wide' \ - kgsvcalloyaml='kubectl get service --all-namespaces -o yaml' \ - kgsvconame='kubectl get service -o name' \ - kgsvcowide='kubectl get service -o wide' \ - kgsvcoyaml='kubectl get service -o yaml' \ - klo='kubectl logs' \ - kpf='kubectl port-forward' \ - krm='kubectl delete' \ - krmcj='kubectl delete cronjob' \ - krmcm='kubectl delete configmap' \ - krmdep='kubectl delete deployment' \ - krming='kubectl delete ingress' \ - krmj='kubectl delete job' \ - krmns='kubectl delete namespace' \ - krmpo='kubectl delete pod' \ - krmpvc='kubectl delete persistentvolumeclaim' \ - krmsec='kubectl delete secret' \ - krmsts='kubectl delete statefulset' \ - krmsvc='kubectl delete service' diff --git a/.config/newsraft/feeds b/.config/newsraft/feeds index 71ea268..b2fc27a 100644 --- a/.config/newsraft/feeds +++ b/.config/newsraft/feeds @@ -1,8 +1,9 @@ @ Global [60] {100} @ Entertainment -https://www.youtube.com/feeds/videos.xml?channel_id=UCI4W-ck8ZLA_YljxMhlpg2g "ChessSimp" -https://www.youtube.com/feeds/videos.xml?channel_id=UCto7D1L-MiRoOziCXK9uT5Q "LetsGameItOut" +https://www.youtube.com/feeds/videos.xml?channel_id=UCI4W-ck8ZLA_YljxMhlpg2g "Chess Simp" +https://www.youtube.com/feeds/videos.xml?channel_id=UCto7D1L-MiRoOziCXK9uT5Q "Let's Game It Out" +https://www.youtube.com/feeds/videos.xml?channel_id=UCf-vV5woXPFpkvZKwooWoyw "WirtualTV" @ News https://archlinux.org/feeds/news/ "ArchLinux" @@ -24,6 +25,7 @@ https://www.getmonero.org/feed.xml "Monero" https://github.com/nextcloud/server/releases.atom "Nextcloud" https://github.com/searxng/searxng/commits/master.atom "SearXNG" https://github.com/element-hq/synapse/releases.atom "Synapse" +https://github.com/matrix-org/dendrite/releases.atom "Dendrite" https://github.com/qbittorrent/qBittorrent/tags.atom "qBittorrent" https://github.com/ventoy/Ventoy/releases.atom "Ventoy" diff --git a/.config/nvim/pack/plugins/opt/telescope b/.config/nvim/pack/plugins/opt/telescope index 61a4a61..bfcc7d5 160000 --- a/.config/nvim/pack/plugins/opt/telescope +++ b/.config/nvim/pack/plugins/opt/telescope @@ -1 +1 @@ -Subproject commit 61a4a615366c470a4e9ca8f8b45718b6b92af73f +Subproject commit bfcc7d5c6f12209139f175e6123a7b7de6d9c18a diff --git a/.config/nvim/pack/plugins/opt/treesitter b/.config/nvim/pack/plugins/opt/treesitter index 53b32a6..ffd7725 160000 --- a/.config/nvim/pack/plugins/opt/treesitter +++ b/.config/nvim/pack/plugins/opt/treesitter @@ -1 +1 @@ -Subproject commit 53b32a6aa3e1de224e82f88cbdc08584c753adb7 +Subproject commit ffd7725102f47e7391d7a5e7621d178689602a52 diff --git a/.inputrc b/.inputrc index 7d10e32..0e6365f 100644 --- a/.inputrc +++ b/.inputrc @@ -1,6 +1,13 @@ set colored-stats on -set show-all-if-unmodified on +set menu-complete-display-prefix on +set show-all-if-ambiguous on "\e[A":history-search-backward +"\e[B":history-search-forward -Control-l: clear-screen +"\C-l": clear-screen + +"\C-w": backward-kill-word + +TAB:menu-complete +"\e[Z":menu-complete-backward diff --git a/.local/share/bash-completion/completions/doas b/.local/share/bash-completion/completions/doas deleted file mode 100644 index 1df51db..0000000 --- a/.local/share/bash-completion/completions/doas +++ /dev/null @@ -1 +0,0 @@ -complete -F _command doas diff --git a/.local/share/bash-completion/completions/k b/.local/share/bash-completion/completions/k deleted file mode 100644 index 403affb..0000000 --- a/.local/share/bash-completion/completions/k +++ /dev/null @@ -1,2 +0,0 @@ -. /usr/share/bash-completion/completions/kubectl -complete -F __start_kubectl k diff --git a/.local/share/bash-completion/completions/kctx b/.local/share/bash-completion/completions/kctx index c775afd..a4f5cdc 100644 --- a/.local/share/bash-completion/completions/kctx +++ b/.local/share/bash-completion/completions/kctx @@ -1,6 +1,7 @@ function _kctx() { + [ "$COMP_CWORD" -ne 1 ] && return mapfile -t COMPREPLY < <(compgen -W \ "$(kubectl config get-contexts -o name)" \ -- "${COMP_WORDS[1]}") } -complete -F _kctx kctx +complete -o nospace -F _kctx kctx diff --git a/.local/share/bash-completion/completions/kns b/.local/share/bash-completion/completions/kns index a139820..6781879 100644 --- a/.local/share/bash-completion/completions/kns +++ b/.local/share/bash-completion/completions/kns @@ -1,6 +1,7 @@ function _kns() { + [ "$COMP_CWORD" -ne 1 ] && return mapfile -t COMPREPLY < <(compgen -W \ "$(kubectl get namespace -o jsonpath='{..metadata.name}')" \ -- "${COMP_WORDS[1]}") } -complete -F _kns kns +complete -o nospace -F _kns kns diff --git a/.local/share/bash-completion/completions/pac b/.local/share/bash-completion/completions/pac new file mode 100644 index 0000000..3abc060 --- /dev/null +++ b/.local/share/bash-completion/completions/pac @@ -0,0 +1,2 @@ +. /usr/share/bash-completion/completions/pacman +complete -F _pacman pac