diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2015-10-14 14:59:27 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2015-10-14 14:59:27 +0200 |
| commit | a10a81e2b761f87b49844b0a52323868dda16b07 (patch) | |
| tree | 361d44937afea8b2fdcdf9655e1fb2617f0097d4 /config/fish | |
| parent | 5f819c84381c98c00718e44f723b4f4113489203 (diff) | |
| download | dotfiles-a10a81e2b761f87b49844b0a52323868dda16b07.tar.gz dotfiles-a10a81e2b761f87b49844b0a52323868dda16b07.zip | |
add function to search processes
Diffstat (limited to 'config/fish')
| -rw-r--r-- | config/fish/functions/pss.fish | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/config/fish/functions/pss.fish b/config/fish/functions/pss.fish new file mode 100644 index 0000000..f8832c5 --- /dev/null +++ b/config/fish/functions/pss.fish @@ -0,0 +1,12 @@ +function pss + if test (count $argv) -ne 1 + echo "usage: pss PATTERN" + else + set pids (pgrep -d , -f $argv[1]) + if test -n $pids + echo -ne "\033[1;32m" + ps -Fp $pids + echo -ne "\033[1;0m" + end + end +end |
