rm completion for nvim

This commit is contained in:
TheK4n 2023-03-08 13:26:24 +03:00
parent 688e5153e1
commit a6ed06b81f
4 changed files with 13 additions and 25 deletions

View File

@ -87,13 +87,8 @@ fi
# python
alias pipir='python3 -m pip install -r requirements.txt'
alias pipar='python3 -m pip freeze > requirements.txt'
# initializes first ./*/*/activate
# alias va='source "$(find -P . -maxdepth 3 -type f -name activate | sort | head -n 1)" &>/dev/null || echo "error: virtual env not found, use python3 -m virtualenv venv" >&2'
alias ve='python3 -m virtualenv venv && . venv/bin/activate'
alias vd='deactivate'
# git
alias watch-diff='watch --color "git diff --color=always"'

View File

@ -59,6 +59,19 @@ cl() {
}
ve() {
local venv_name
if [ -n "$1" ]; then
venv_name="$1"
else
venv_name="venv"
fi
python3 -m virtualenv "$venv_name" && . "$venv_name/bin/activate"
}
va() {
local activate_venv
@ -164,9 +177,6 @@ py() {
# to allow sudo user toggle vpn without password:
## sudo groupadd wireguard
## sudo usermod -aG wireguard $USER
## sudo vi /etc/sudoers.d/wireguard
### %wireguard ALL= NOPASSWD: /sbin/systemctl start wg-quick@wg0.service
### %wireguard ALL= NOPASSWD: /sbin/systemctl stop wg-quick@wg0.service
vpn() {
local STATUS SERVICE CONFIG CONFIGFILE
CONFIG="$1"

View File

@ -3,7 +3,6 @@
fpath=(~/.zfunc $fpath)
autoload -Uz compinit
compinit -d ~/.cache/zcompdump
compdef _nvim nvim
compdef _files mcd
compdef _poetry poetry
zstyle ':completion:*:*:*:*:*' menu select

View File

@ -1,16 +0,0 @@
#compdef nvim
#autoload
_nvim() {
subcmds=($(git diff --name-only --relative --diff-filter=d 2>/dev/null) $(git diff --name-only --relative --staged --diff-filter=d 2>/dev/null))
if [[ -z "$subcmds" ]]; then
_files
else
_files
_values -C 'modified files' $subcmds
fi
}
_nvim