diff options
Diffstat (limited to 'src/key_command/impl_display.rs')
-rw-r--r-- | src/key_command/impl_display.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/key_command/impl_display.rs b/src/key_command/impl_display.rs index 50252ed..b219a9a 100644 --- a/src/key_command/impl_display.rs +++ b/src/key_command/impl_display.rs @@ -49,7 +49,17 @@ impl std::fmt::Display for Command { Self::SearchRegex { pattern } => write!(f, "{} {}", self.command(), pattern), Self::SearchString { pattern } => write!(f, "{} {}", self.command(), pattern), Self::SubProcess { words, .. } => write!(f, "{} {:?}", self.command(), words), - Self::Sort(t) => write!(f, "{} {}", self.command(), t), + Self::Sort { sort_type, reverse } => write!( + f, + "{} {}{}", + self.command(), + sort_type, + match reverse { + Some(true) => " --reverse=true", + Some(false) => " --reverse=false", + None => "", + }, + ), Self::TabSwitch { offset } => write!(f, "{} {}", self.command(), offset), Self::TabSwitchIndex { index } => write!(f, "{} {}", self.command(), index), _ => write!(f, "{}", self.command()), |