mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-19 09:03:43 -05:00
Updated Examples (markdown)
16
Examples.md
16
Examples.md
@@ -346,6 +346,22 @@ fkill() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
```sh
|
||||||
|
# fkill - kill processes - list only the ones you can kill. Modified the earlier script.
|
||||||
|
fkill() {
|
||||||
|
local pid
|
||||||
|
if [ "$UID" != "0" ]; then
|
||||||
|
pid=$(ps -f -u $UID | sed 1d | fzf -m | awk '{print $2}')
|
||||||
|
else
|
||||||
|
pid=$(ps -ef | sed 1d | fzf -m | awk '{print $2}')
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "x$pid" != "x" ]
|
||||||
|
then
|
||||||
|
echo $pid | xargs kill -${1:-9}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### Git
|
### Git
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user