aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel <kingdread@gmx.de>2020-05-13 16:36:57 +0200
committerDaniel <kingdread@gmx.de>2020-05-13 16:36:57 +0200
commit5272800a7e397f6fcc7933b474d182fec4d18b08 (patch)
treea28aea95660964f5b7e7b208054f19045a38a519 /src
parentb6a13c465983993ac581051bb24a13d4296731a1 (diff)
downloadraidgrep-5272800a7e397f6fcc7933b474d182fec4d18b08.tar.gz
raidgrep-5272800a7e397f6fcc7933b474d182fec4d18b08.tar.bz2
raidgrep-5272800a7e397f6fcc7933b474d182fec4d18b08.zip
change sorting reversing prefix to ~
Since - leads to structopt interpreting the component as the start of another argument, we need to use a different one.
Diffstat (limited to 'src')
-rw-r--r--src/output/sorting.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/output/sorting.rs b/src/output/sorting.rs
index 8b271a9..4f5cf19 100644
--- a/src/output/sorting.rs
+++ b/src/output/sorting.rs
@@ -38,7 +38,7 @@ impl FromStr for Component {
type Err = InvalidComponent;
fn from_str(s: &str) -> Result<Self, Self::Err> {
- if s.starts_with('-') {
+ if s.starts_with('~') {
return s[1..].parse().map(|c| Component::Reverse(Box::new(c)));
}
match &s.to_lowercase() as &str {
@@ -58,7 +58,7 @@ impl Display for Component {
Component::Boss=> write!(f, "boss"),
Component::Outcome => write!(f, "outcome"),
Component::ChallengeMote => write!(f, "cm"),
- Component::Reverse(ref inner) => write!(f, "-{}", inner),
+ Component::Reverse(ref inner) => write!(f, "~{}", inner),
}
}
}