Skip to content

Commit

Permalink
Use PathBuf for file paths in CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
bensadeh committed Oct 13, 2024
1 parent 479256b commit 1c51228
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ pub mod completions;
pub mod keywords;

use clap::{Parser, ValueEnum};
use std::path::PathBuf;

#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum)]
pub enum HighlighterGroup {
Expand All @@ -24,7 +25,7 @@ pub enum HighlighterGroup {
pub struct Cli {
/// Path to file or folder
#[clap(name = "FILE", value_hint = clap::ValueHint::AnyPath)]
pub file_or_folder_path: Option<String>,
pub file_or_folder_path: Option<PathBuf>,

/// Follow the contents of a file
#[clap(short = 'f', long = "follow")]
Expand Down

0 comments on commit 1c51228

Please sign in to comment.