diff --git a/48-plugins.zsh b/48-plugins.zsh index 67c80ae..8815400 100644 --- a/48-plugins.zsh +++ b/48-plugins.zsh @@ -26,7 +26,6 @@ zcomet load ohmyzsh plugins/debian zcomet load ohmyzsh plugins/isodate zcomet load ohmyzsh plugins/nmap zcomet load ohmyzsh plugins/rsync -zcomet load ohmyzsh plugins/systemadmin zcomet load ohmyzsh plugins/web-search zcomet load brymck/print-alias diff --git a/65-scripts.zsh b/65-scripts.zsh index 7826074..ab75d89 100644 --- a/65-scripts.zsh +++ b/65-scripts.zsh @@ -55,3 +55,27 @@ exdl() { fi done } + +psgrep() { + ps aux | grep "${1:-.}" | grep -v grep +} + +# Kills any process that matches a regexp passed to it +killit() { + ps aux | grep -v "grep" | grep "$@" | awk '{print $2}' | xargs sudo kill +} + +# gather external ip address +geteip() { + curl -s -S -4 https://icanhazip.com + curl -s -S -6 https://icanhazip.com +} + +# determine local IP address(es) +getip() { + if (( ${+commands[ip]} )); then + ip addr | awk '/inet /{print $2}' | command grep -v 127.0.0.1 + else + ifconfig | awk '/inet /{print $2}' | command grep -v 127.0.0.1 + fi +} diff --git a/75-aliases.zsh b/75-aliases.zsh index a2619a4..46d69a0 100644 --- a/75-aliases.zsh +++ b/75-aliases.zsh @@ -5,6 +5,9 @@ alias dotdrop="$HOME/etc/dotdrop.sh" --cfg="$HOME/etc/config.yaml" alias zcp='zmv -C' alias zln='zmv -L' +alias path='print -l $path' +alias mkdir='mkdir -pv' + # APT alias aptu='sudo apt-get update' alias aptn='sudo apt-get update && sudo apt-get dist-upgrade'