Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix filename completion #188

Merged
merged 2 commits into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ readme = "README.md"
anyhow = "1.0.53"
blake3 = "1.3.3"
clap = { version = "4", features = ["derive", "env", "wrap_help"] }
clap_complete = "4"
clap_complete = "4.4.10"
console = "0.15.4"
dirs = "5"
fastrand = "2"
Expand Down
6 changes: 3 additions & 3 deletions src/command/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub use encode::*;
pub use vmaf::*;

use crate::{command::encode::default_output_ext, ffprobe::Ffprobe};
use clap::Parser;
use clap::{Parser, ValueHint};
use std::{
path::{Path, PathBuf},
sync::Arc,
Expand All @@ -19,7 +19,7 @@ pub struct EncodeToOutput {
/// Output file, by default the same as input with `.av1` before the extension.
///
/// E.g. if unspecified: -i vid.mkv --> vid.av1.mkv
#[arg(short, long)]
#[arg(short, long, value_hint = ValueHint::FilePath)]
pub output: Option<PathBuf>,

/// Set the output ffmpeg audio codec.
Expand Down Expand Up @@ -69,7 +69,7 @@ pub struct Sample {

/// Directory to store temporary sample data in.
/// Defaults to using the input's directory.
#[arg(long, env = "AB_AV1_TEMP_DIR")]
#[arg(long, env = "AB_AV1_TEMP_DIR", value_hint = ValueHint::DirPath)]
pub temp_dir: Option<PathBuf>,

/// Extension preference for encoded samples (ffmpeg encoder only).
Expand Down
4 changes: 2 additions & 2 deletions src/command/args/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{
float::TerseF32,
};
use anyhow::ensure;
use clap::Parser;
use clap::{Parser, ValueHint};
use std::{
collections::HashMap,
fmt::{self, Write},
Expand All @@ -23,7 +23,7 @@ pub struct Encode {
pub encoder: Encoder,

/// Input video file.
#[arg(short, long)]
#[arg(short, long, value_hint = ValueHint::FilePath)]
pub input: PathBuf,

/// Ffmpeg video filter applied to the input before av1 encoding.
Expand Down