completions: hint generator to expand to file paths

This commit is contained in:
João M. Bezerra 2023-09-12 13:15:55 -03:00
parent c0e053136f
commit 7c6989de0e
2 changed files with 9 additions and 5 deletions

View File

@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
_This changelog was created after v0.3.1 was released. As a result, there may be slight inaccuracies with versions <= v0.3.1._
_This changelog was created after v0.3.1. As a result, there may be slight inaccuracies with prior versions._
Categories Used:
@ -24,6 +24,10 @@ Categories Used:
- Fix size unit inconsistency [\#502](https://github.com/ouch-org/ouch/pull/502) ([marcospb19](https://github.com/marcospb19))
### Improvements
- Hint completions generator to expand file paths [\#508](https://github.com/ouch-org/ouch/pull/508) ([marcospb19](https://github.com/marcospb19))
## [0.4.2](https://github.com/ouch-org/ouch/compare/0.4.1...0.4.2)
### New Features

View File

@ -53,7 +53,7 @@ pub enum Subcommand {
#[command(visible_alias = "c")]
Compress {
/// Files to be compressed
#[arg(required = true, num_args = 1..)]
#[arg(required = true, value_hint = ValueHint::FilePath)]
files: Vec<PathBuf>,
/// The resulting file. Its extensions can be used to specify the compression formats
@ -78,18 +78,18 @@ pub enum Subcommand {
#[command(visible_alias = "d")]
Decompress {
/// Files to be decompressed
#[arg(required = true, num_args = 1..)]
#[arg(required = true, num_args = 1.., value_hint = ValueHint::FilePath)]
files: Vec<PathBuf>,
/// Place results in a directory other than the current one
#[arg(short = 'd', long = "dir", value_hint = ValueHint::DirPath)]
#[arg(short = 'd', long = "dir", value_hint = ValueHint::FilePath)]
output_dir: Option<PathBuf>,
},
/// List contents of an archive
#[command(visible_aliases = ["l", "ls"])]
List {
/// Archives whose contents should be listed
#[arg(required = true, num_args = 1..)]
#[arg(required = true, num_args = 1.., value_hint = ValueHint::FilePath)]
archives: Vec<PathBuf>,
/// Show archive contents as a tree