Release 1.0.0
This commit is contained in:
parent
6fe5da3f51
commit
0cbb957da9
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -19,7 +19,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pkill"
|
name = "pkill"
|
||||||
version = "0.1.0"
|
version = "1.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itertools",
|
"itertools",
|
||||||
"windows",
|
"windows",
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "pkill"
|
name = "pkill"
|
||||||
version = "0.1.0"
|
version = "1.0.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
strip = true
|
||||||
|
opt-level = "z"
|
||||||
|
lto = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
windows = { version = "0.52.0", features = [
|
windows = { version = "0.52.0", features = [
|
||||||
"Win32_Foundation",
|
"Win32_Foundation",
|
||||||
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2024 aNNiMON
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
21
README.md
Normal file
21
README.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
## Process Kill
|
||||||
|
|
||||||
|
Windows utility to display and terminate processes.
|
||||||
|
|
||||||
|
```
|
||||||
|
❯ pkill bash
|
||||||
|
Name PID Threads
|
||||||
|
wezterm-gui.exe 6020 25
|
||||||
|
bash.exe 9036 4
|
||||||
|
bash.exe 1100 2
|
||||||
|
```
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
- `pkill` — all unique processed, excl. system
|
||||||
|
- `pkill <name>` — filtered processes by name or it's part
|
||||||
|
- `pkill -a/--all` — all processes, incl. system
|
||||||
|
- `pkill -t/--tree` — all processes as tree
|
||||||
|
- `pkill -p/--pid <name>` — PID of the first occurence
|
||||||
|
- `pkill -k/--kill <PID>/<name>` — terminate process by its PID or name
|
||||||
|
- `pkill -h/--help` — print help
|
@ -21,7 +21,11 @@ pub struct ProcessInfo {
|
|||||||
|
|
||||||
impl fmt::Display for ProcessInfo {
|
impl fmt::Display for ProcessInfo {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
write!(f, "{:<10} {:<10} {:<8} {:<32}", self.pid, self.parent_pid, self.threads_count, self.name)
|
write!(
|
||||||
|
f,
|
||||||
|
"{:<10} {:<10} {:<8} {:<32}",
|
||||||
|
self.pid, self.parent_pid, self.threads_count, self.name
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user