pub struct ShellConfig {Show 16 fields
pub shell_exit_action: ShellExitAction,
pub custom_shell: Option<String>,
pub shell_args: Option<Vec<String>>,
pub working_directory: Option<String>,
pub startup_directory_mode: StartupDirectoryMode,
pub startup_directory: Option<String>,
pub last_working_directory: Option<String>,
pub shell_env: Option<HashMap<String, String>>,
pub login_shell: bool,
pub initial_text: String,
pub initial_text_delay_ms: u64,
pub initial_text_send_newline: bool,
pub answerback_string: String,
pub prompt_on_quit: bool,
pub confirm_close_running_jobs: bool,
pub jobs_to_ignore: Vec<String>,
}Expand description
Which shell runs, where it starts, what it is sent, and what happens when it exits.
Fields§
§shell_exit_action: ShellExitActionAction to take when the shell process exits Supports: close, keep, restart_immediately, restart_with_prompt, restart_after_delay For backward compatibility, also accepts boolean values (true=close, false=keep)
custom_shell: Option<String>Custom shell command (defaults to system shell if not specified)
shell_args: Option<Vec<String>>Arguments to pass to the shell
working_directory: Option<String>Working directory for the shell (legacy, use startup_directory_mode instead) When set, overrides startup_directory_mode for backward compatibility
startup_directory_mode: StartupDirectoryModeStartup directory mode: controls where new sessions start
- home: Start in user’s home directory (default)
- previous: Remember and restore last working directory from previous session
- custom: Start in the directory specified by startup_directory
startup_directory: Option<String>Custom startup directory (used when startup_directory_mode is “custom”) Supports ~ for home directory expansion
last_working_directory: Option<String>Last working directory from previous session (auto-managed) Used when startup_directory_mode is “previous”
shell_env: Option<HashMap<String, String>>Environment variables to set for the shell
login_shell: boolWhether to spawn the shell as a login shell (passes -l flag) This is important on macOS to properly initialize PATH from Homebrew, /etc/paths.d, etc. Default: true
initial_text: StringText to send automatically when a terminal session starts Supports escape sequences: \n (newline), \r (carriage return), \t (tab), \xHH (hex), \e (ESC)
initial_text_delay_ms: u64Delay in milliseconds before sending the initial text (to allow shell to be ready)
initial_text_send_newline: boolWhether to append a newline after sending the initial text
answerback_string: StringAnswerback string sent in response to ENQ (0x05) control character This is a legacy terminal feature used for terminal identification. Default: empty (disabled) for security Common values: “par-term”, “vt100”, or custom identification Security note: Setting this may expose terminal identification to applications
prompt_on_quit: boolShow confirmation dialog before quitting the application When enabled, closing the window will show a confirmation dialog if there are any open terminal sessions. Default: false (close immediately without confirmation)
confirm_close_running_jobs: boolShow confirmation dialog before closing a tab with running jobs When enabled, closing a tab that has a running command will show a confirmation dialog. Default: false (close immediately without confirmation)
jobs_to_ignore: Vec<String>List of job/process names to ignore when checking for running jobs These jobs will not trigger a close confirmation dialog. Common examples: “bash”, “zsh”, “fish”, “cat”, “less”, “man”, “sleep” Default: common shell names that shouldn’t block tab close
Trait Implementations§
Source§impl Clone for ShellConfig
impl Clone for ShellConfig
Source§fn clone(&self) -> ShellConfig
fn clone(&self) -> ShellConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ShellConfig
impl Debug for ShellConfig
Source§impl Default for ShellConfig
impl Default for ShellConfig
Source§fn default() -> ShellConfig
fn default() -> ShellConfig
Source§impl<'de> Deserialize<'de> for ShellConfig
impl<'de> Deserialize<'de> for ShellConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ShellConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ShellConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for ShellConfig
impl Serialize for ShellConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for ShellConfig
impl RefUnwindSafe for ShellConfig
impl Send for ShellConfig
impl Sync for ShellConfig
impl Unpin for ShellConfig
impl UnsafeUnpin for ShellConfig
impl UnwindSafe for ShellConfig
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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 moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().