From 91b3c764075c000bff2f7f6bbc816c49e4e273b1 Mon Sep 17 00:00:00 2001 From: histalek Date: Mon, 12 Jul 2021 16:03:02 +0200 Subject: [PATCH] zsh: Extract functions from aliases.zsh --- .config/oh-my-zsh/aliases.zsh | 10 ---------- .config/oh-my-zsh/functions.zsh | 12 ++++++++++++ 2 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 .config/oh-my-zsh/functions.zsh diff --git a/.config/oh-my-zsh/aliases.zsh b/.config/oh-my-zsh/aliases.zsh index 6d2777e..3d80cbc 100644 --- a/.config/oh-my-zsh/aliases.zsh +++ b/.config/oh-my-zsh/aliases.zsh @@ -39,16 +39,6 @@ alias du='du -h -d 2' alias ipa='ip -br -c addr show' alias ipl='ip -br -c link show' -## get parent and child processes for a given name -function psgrep { - ps axuf | grep -v grep | grep "$@" -i --color=auto; -} - -## check active hosts on subnet -function getActiveHosts { - nmap -sP $(ip route | awk '/src/ {print $1}'); -} - ## always spawn new window for firefox alias firefox='firefox --new-window' diff --git a/.config/oh-my-zsh/functions.zsh b/.config/oh-my-zsh/functions.zsh new file mode 100644 index 0000000..c91816f --- /dev/null +++ b/.config/oh-my-zsh/functions.zsh @@ -0,0 +1,12 @@ +# general functions + +## get parent and child processes for a given name +function psgrep { + ps axuf | grep -v grep | grep "$@" -i --color=auto; +} + +## check active hosts on subnet +function getActiveHosts { + nmap -sP $(ip route | awk '/src/ {print $1}'); +} +