Release 1.0.0

This commit is contained in:
aNNiMON 2024-08-02 22:40:10 +03:00
parent 6fe5da3f51
commit 0cbb957da9
5 changed files with 56 additions and 5 deletions

2
Cargo.lock generated
View File

@ -19,7 +19,7 @@ dependencies = [
[[package]]
name = "pkill"
version = "0.1.0"
version = "1.0.0"
dependencies = [
"itertools",
"windows",

View File

@ -1,12 +1,17 @@
[package]
name = "pkill"
version = "0.1.0"
version = "1.0.0"
edition = "2021"
[profile.release]
strip = true
opt-level = "z"
lto = true
[dependencies]
windows = { version = "0.52.0", features = [
"Win32_Foundation",
"Win32_System_Diagnostics_ToolHelp",
"Win32_System_Threading",
] }
itertools = "0.13.0"
itertools = "0.13.0"

21
LICENSE Normal file
View 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
View 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

View File

@ -21,7 +21,11 @@ pub struct ProcessInfo {
impl fmt::Display for ProcessInfo {
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
)
}
}
@ -63,4 +67,4 @@ pub fn terminate_process(process_id: u32) -> bool {
false
}
}
}
}