pub enum ShellPause {
Always,
OnError,
Never,
}Expand description
When Trail prints the result block and waits for a key before reclaiming the screen from a command.
Without a pause, run_external re-enters the alternate screen the instant the
child exits, so the output of !ls is painted and erased in the same breath.
The editor is the reason this is a choice rather than always on: nobody wants
to press Enter after closing their editor.
Variants§
Always
Always wait — the default for !<command> and :git.
OnError
Wait only when the command exited non-zero, or could not be run at all.
Never
Never wait. Used for the editor and for OS-handler opens, whatever the configured policy is, since those draw their own screens.
Implementations§
Source§impl ShellPause
impl ShellPause
Sourcepub fn parse(value: &str) -> Option<ShellPause>
pub fn parse(value: &str) -> Option<ShellPause>
Parses a [general] shell_pause value.
Returns None for an unrecognised name so the config layer can report it
with the key that carried it.
Trait Implementations§
Source§impl Clone for ShellPause
impl Clone for ShellPause
impl Copy for ShellPause
Source§impl Debug for ShellPause
impl Debug for ShellPause
impl Eq for ShellPause
Source§impl PartialEq for ShellPause
impl PartialEq for ShellPause
impl StructuralPartialEq for ShellPause
Auto Trait Implementations§
impl Freeze for ShellPause
impl RefUnwindSafe for ShellPause
impl Send for ShellPause
impl Sync for ShellPause
impl Unpin for ShellPause
impl UnsafeUnpin for ShellPause
impl UnwindSafe for ShellPause
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more