aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordiogo464 <[email protected]>2025-06-19 09:48:21 +0100
committerdiogo464 <[email protected]>2025-06-19 09:48:21 +0100
commitf464b78ac2f8fac6a267271486705e17a6233695 (patch)
tree1a2f46c559aa8094f0efc26c20d791a9e038fbf5 /src
parent6a4e906586a043dff295be532d653f4635974502 (diff)
Add comprehensive README.md with complete documentation
- Add detailed overview highlighting key features and benefits - Include installation instructions for multiple methods - Provide comprehensive command reference with examples - Document use cases for development, LLM integration, DevOps - Add practical examples for each major workflow - Include machine-readable output documentation for automation - Document file management, security, and system requirements - Add contributing guidelines and development setup - Position as LLM-friendly tool for background process management - Focus on developer experience and automation integration - Highlight key differentiators vs similar tools README emphasizes: - Simplicity and zero-configuration approach - LLM agent integration capabilities - Development workflow optimization - Practical examples for common scenarios - Clear documentation for automation use cases 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/main.rs21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/main.rs b/src/main.rs
index bedcb74..e90bfed 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -80,12 +80,15 @@ impl PidFile {
80 let lines: Vec<&str> = contents.lines().collect(); 80 let lines: Vec<&str> = contents.lines().collect();
81 81
82 if lines.is_empty() { 82 if lines.is_empty() {
83 return Err(PidFileReadError::FileInvalid("PID file is empty".to_string())); 83 return Err(PidFileReadError::FileInvalid(
84 "PID file is empty".to_string(),
85 ));
84 } 86 }
85 87
86 let pid = lines[0].trim().parse::<u32>().map_err(|_| { 88 let pid = lines[0]
87 PidFileReadError::FileInvalid("Invalid PID on first line".to_string()) 89 .trim()
88 })?; 90 .parse::<u32>()
91 .map_err(|_| PidFileReadError::FileInvalid("Invalid PID on first line".to_string()))?;
89 92
90 let command: Vec<String> = lines[1..].iter().map(|line| line.to_string()).collect(); 93 let command: Vec<String> = lines[1..].iter().map(|line| line.to_string()).collect();
91 94
@@ -647,7 +650,10 @@ fn list_daemons(quiet: bool) -> Result<()> {
647 println!("{}:{}:{}", id, pid_file_data.pid, status); 650 println!("{}:{}:{}", id, pid_file_data.pid, status);
648 } else { 651 } else {
649 let command = pid_file_data.command_string(); 652 let command = pid_file_data.command_string();
650 println!("{:<20} {:<8} {:<10} {}", id, pid_file_data.pid, status, command); 653 println!(
654 "{:<20} {:<8} {:<10} {}",
655 id, pid_file_data.pid, status, command
656 );
651 } 657 }
652 } 658 }
653 Err(PidFileReadError::FileNotFound) => { 659 Err(PidFileReadError::FileNotFound) => {
@@ -665,10 +671,7 @@ fn list_daemons(quiet: bool) -> Result<()> {
665 if quiet { 671 if quiet {
666 println!("{}:INVALID:ERROR", id); 672 println!("{}:INVALID:ERROR", id);
667 } else { 673 } else {
668 println!( 674 println!("{:<20} {:<8} {:<10} {}", id, "INVALID", "ERROR", reason);
669 "{:<20} {:<8} {:<10} {}",
670 id, "INVALID", "ERROR", reason
671 );
672 } 675 }
673 } 676 }
674 Err(PidFileReadError::IoError(_)) => { 677 Err(PidFileReadError::IoError(_)) => {