zsh: Extract functions from aliases.zsh

This commit is contained in:
histalek 2021-07-12 16:03:02 +02:00
parent ba7030ab73
commit 91b3c76407
No known key found for this signature in database
GPG key ID: ED1D6449704FDE03
2 changed files with 12 additions and 10 deletions

View file

@ -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'

View file

@ -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}');
}