zsh: Extract functions from aliases.zsh
This commit is contained in:
parent
ba7030ab73
commit
91b3c76407
2 changed files with 12 additions and 10 deletions
|
@ -39,16 +39,6 @@ alias du='du -h -d 2'
|
||||||
alias ipa='ip -br -c addr show'
|
alias ipa='ip -br -c addr show'
|
||||||
alias ipl='ip -br -c link 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
|
## always spawn new window for firefox
|
||||||
alias firefox='firefox --new-window'
|
alias firefox='firefox --new-window'
|
||||||
|
|
||||||
|
|
12
.config/oh-my-zsh/functions.zsh
Normal file
12
.config/oh-my-zsh/functions.zsh
Normal 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}');
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue