Skip to content

Commit

Permalink
fix: readd replstr
Browse files Browse the repository at this point in the history
  • Loading branch information
LoricAndre committed Nov 8, 2024
1 parent 11ae035 commit 56eed66
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 41 deletions.
4 changes: 4 additions & 0 deletions skim/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ pub struct SkimOptions {
#[arg(short, long, help_heading = "Interface")]
pub interactive: bool,

/// Replace replstr with the selected item in commands
#[arg(short = 'I', default_value = "{}", help_heading = "Interface")]
pub replstr: String,

/// Set color theme
///
/// Format: [BASE][,COLOR:ANSI]
Expand Down
2 changes: 2 additions & 0 deletions skim/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ impl Query {

self.cmd_prompt = options.cmd_prompt.clone();

self.replstr = options.replstr.clone();

if let Some(filename) = &options.history {
self.fz_query_history_before = read_file_lines(filename)?;
}
Expand Down
41 changes: 0 additions & 41 deletions test.Dockerfile

This file was deleted.

1 change: 1 addition & 0 deletions test/test_skim.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,7 @@ def test_multiple_option_values_should_be_accepted(self):
'--delimiter , --delimiter . -d ,',
'--nth 1,2 --nth=1,3 -n 1,3',
'--with-nth 1,2 --with-nth=1,3',
'-I {} -I XX',
'--color base --color light',
'--margin 30% --margin 0',
'--min-height 30% --min-height 10',
Expand Down

0 comments on commit 56eed66

Please sign in to comment.