some changes

This commit is contained in:
pika 2024-12-06 14:22:33 +01:00
parent 8c0178c768
commit 546100f0e5

32
.zshrc
View file

@ -172,22 +172,10 @@ DEBUG_PLUG=""
plugin $zPlug loadet." plugin $zPlug loadet."
done done
p_has() { if command_exists cowsay; then
if ! command_exists has; then cowsay -f art tux "$(uname -r)"
inst_has() {
git clone https://github.com/kdabir/has.git /tmp/has && cd /tmp/has && sudo make install && cd $HOME/ && rm -r /tmp/has
}
echo_info "Installing has"
inst_has >/dev/null 2>&1
else
tools() {
local pkgs=("bash" "zsh" "git" "curl" "make" "cmake" "gcc" "g++" "rg" "docker" "composer" "node" "npm" "php" "jre" "python3" "go" "cargo")
has $pkgs
}
fi fi
} }
p_has
}
_alias(){ _alias(){
alias please="sudo" alias please="sudo"
@ -514,6 +502,14 @@ _coding_() {
} }
fi fi
if command_exists bc; then
math() {
echo "$*" | bc -l
}
else
echo_error "No bc, so no math will work"
fi
} }
# ─< rsync >──────────────────────────────────────────────────────────────────────────────── # ─< rsync >────────────────────────────────────────────────────────────────────────────────
@ -603,14 +599,6 @@ _tools_(){
fi fi
} }
if command_exists bc; then
math() {
echo "$*" | bc -l
}
else
echo_error "No bc, so no math will work"
fi
_environment(){ _environment(){
if command_exists nvim; then if command_exists nvim; then
export EDITOR="nvim" export EDITOR="nvim"