From f464b78ac2f8fac6a267271486705e17a6233695 Mon Sep 17 00:00:00 2001 From: diogo464 Date: Thu, 19 Jun 2025 09:48:21 +0100 Subject: Add comprehensive README.md with complete documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- src/main.rs | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src') 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 { let lines: Vec<&str> = contents.lines().collect(); if lines.is_empty() { - return Err(PidFileReadError::FileInvalid("PID file is empty".to_string())); + return Err(PidFileReadError::FileInvalid( + "PID file is empty".to_string(), + )); } - let pid = lines[0].trim().parse::().map_err(|_| { - PidFileReadError::FileInvalid("Invalid PID on first line".to_string()) - })?; + let pid = lines[0] + .trim() + .parse::() + .map_err(|_| PidFileReadError::FileInvalid("Invalid PID on first line".to_string()))?; let command: Vec = lines[1..].iter().map(|line| line.to_string()).collect(); @@ -647,7 +650,10 @@ fn list_daemons(quiet: bool) -> Result<()> { println!("{}:{}:{}", id, pid_file_data.pid, status); } else { let command = pid_file_data.command_string(); - println!("{:<20} {:<8} {:<10} {}", id, pid_file_data.pid, status, command); + println!( + "{:<20} {:<8} {:<10} {}", + id, pid_file_data.pid, status, command + ); } } Err(PidFileReadError::FileNotFound) => { @@ -665,10 +671,7 @@ fn list_daemons(quiet: bool) -> Result<()> { if quiet { println!("{}:INVALID:ERROR", id); } else { - println!( - "{:<20} {:<8} {:<10} {}", - id, "INVALID", "ERROR", reason - ); + println!("{:<20} {:<8} {:<10} {}", id, "INVALID", "ERROR", reason); } } Err(PidFileReadError::IoError(_)) => { -- cgit