pub struct QuickSession;Expand description
Quick session configuration for common use cases.
Implementations§
Source§impl QuickSession
impl QuickSession
Sourcepub fn shell() -> SessionConfig
pub fn shell() -> SessionConfig
Create a session config for a shell command.
Sourcepub fn bash() -> SessionConfig
pub fn bash() -> SessionConfig
Create a session config for bash.
Sourcepub fn command(cmd: impl Into<String>) -> SessionConfig
pub fn command(cmd: impl Into<String>) -> SessionConfig
Create a session config for a custom command.
Sourcepub fn ssh(host: &str) -> SessionConfig
pub fn ssh(host: &str) -> SessionConfig
Create a session config for SSH.
Sourcepub fn ssh_user(user: &str, host: &str) -> SessionConfig
pub fn ssh_user(user: &str, host: &str) -> SessionConfig
Create a session config for SSH with user.
Sourcepub fn telnet(host: &str, port: u16) -> SessionConfig
pub fn telnet(host: &str, port: u16) -> SessionConfig
Create a session config for telnet.
Sourcepub fn python() -> SessionConfig
pub fn python() -> SessionConfig
Create a session config for Python.
Sourcepub fn cmd() -> SessionConfig
pub fn cmd() -> SessionConfig
Create a session config for Windows Command Prompt.
This configures a cmd.exe session with Windows-style line endings.
Sourcepub fn powershell() -> SessionConfig
pub fn powershell() -> SessionConfig
Create a session config for PowerShell.
Works with both Windows PowerShell (powershell.exe) and
PowerShell Core (pwsh.exe). Defaults to powershell.exe on Windows,
pwsh on other platforms.
Sourcepub fn zsh() -> SessionConfig
pub fn zsh() -> SessionConfig
Create a session config for zsh.
Sourcepub fn fish() -> SessionConfig
pub fn fish() -> SessionConfig
Create a session config for fish shell.
Sourcepub fn repl(cmd: impl Into<String>) -> SessionConfig
pub fn repl(cmd: impl Into<String>) -> SessionConfig
Create a session config for a REPL.
Sourcepub fn node() -> SessionConfig
pub fn node() -> SessionConfig
Create a session config for Node.js REPL.
Sourcepub fn ruby() -> SessionConfig
pub fn ruby() -> SessionConfig
Create a session config for Ruby IRB.
Sourcepub fn mysql(host: &str, user: &str, database: &str) -> SessionConfig
pub fn mysql(host: &str, user: &str, database: &str) -> SessionConfig
Create a session config for MySQL client.
Sourcepub fn mysql_password(host: &str, user: &str, database: &str) -> SessionConfig
pub fn mysql_password(host: &str, user: &str, database: &str) -> SessionConfig
Create a session config for MySQL client with password prompt.
Sourcepub fn psql(host: &str, user: &str, database: &str) -> SessionConfig
pub fn psql(host: &str, user: &str, database: &str) -> SessionConfig
Create a session config for PostgreSQL client.
Sourcepub fn docker_exec(container: &str) -> SessionConfig
pub fn docker_exec(container: &str) -> SessionConfig
Create a session config for Docker exec into a container.
Sourcepub fn docker_exec_shell(container: &str, shell: &str) -> SessionConfig
pub fn docker_exec_shell(container: &str, shell: &str) -> SessionConfig
Create a session config for Docker exec with a specific shell.
Sourcepub fn docker_run(image: &str) -> SessionConfig
pub fn docker_run(image: &str) -> SessionConfig
Create a session config for Docker run with interactive shell.
Sourcepub fn redis_cli(host: &str) -> SessionConfig
pub fn redis_cli(host: &str) -> SessionConfig
Create a session config for Redis CLI.
Sourcepub fn mongosh(uri: &str) -> SessionConfig
pub fn mongosh(uri: &str) -> SessionConfig
Create a session config for MongoDB shell.
Sourcepub fn sqlite(database: &str) -> SessionConfig
pub fn sqlite(database: &str) -> SessionConfig
Create a session config for SQLite.
Sourcepub fn gdb(program: &str) -> SessionConfig
pub fn gdb(program: &str) -> SessionConfig
Create a session config for GDB debugger.
Sourcepub fn lldb(program: &str) -> SessionConfig
pub fn lldb(program: &str) -> SessionConfig
Create a session config for LLDB debugger.
Sourcepub fn lua() -> SessionConfig
pub fn lua() -> SessionConfig
Create a session config for Lua REPL.
Sourcepub fn perl() -> SessionConfig
pub fn perl() -> SessionConfig
Create a session config for Perl debugger.
Sourcepub fn r() -> SessionConfig
pub fn r() -> SessionConfig
Create a session config for R REPL.
Sourcepub fn julia() -> SessionConfig
pub fn julia() -> SessionConfig
Create a session config for Julia REPL.
Sourcepub fn scala() -> SessionConfig
pub fn scala() -> SessionConfig
Create a session config for Scala REPL.
Sourcepub fn iex() -> SessionConfig
pub fn iex() -> SessionConfig
Create a session config for Elixir IEx.
Sourcepub fn clojure() -> SessionConfig
pub fn clojure() -> SessionConfig
Create a session config for Clojure REPL.
Sourcepub fn ghci() -> SessionConfig
pub fn ghci() -> SessionConfig
Create a session config for Haskell GHCi.
Sourcepub fn ocaml() -> SessionConfig
pub fn ocaml() -> SessionConfig
Create a session config for OCaml REPL.
Sourcepub fn kubectl_exec(pod: &str) -> SessionConfig
pub fn kubectl_exec(pod: &str) -> SessionConfig
Create a session config for kubectl exec into a pod.
Sourcepub fn kubectl_exec_ns(namespace: &str, pod: &str, shell: &str) -> SessionConfig
pub fn kubectl_exec_ns(namespace: &str, pod: &str, shell: &str) -> SessionConfig
Create a session config for kubectl exec with namespace.
Sourcepub fn screen_attach(session_name: &str) -> SessionConfig
pub fn screen_attach(session_name: &str) -> SessionConfig
Create a session config for screen attach.
Sourcepub fn tmux_attach(session_name: &str) -> SessionConfig
pub fn tmux_attach(session_name: &str) -> SessionConfig
Create a session config for tmux attach.
Sourcepub fn ssh_port(host: &str, port: u16) -> SessionConfig
pub fn ssh_port(host: &str, port: u16) -> SessionConfig
Create a session config for SSH with a specific port.
Sourcepub fn ssh_full(user: &str, host: &str, port: u16) -> SessionConfig
pub fn ssh_full(user: &str, host: &str, port: u16) -> SessionConfig
Create a session config for SSH with user and port.
Sourcepub fn ssh_key(user: &str, host: &str, key_file: &str) -> SessionConfig
pub fn ssh_key(user: &str, host: &str, key_file: &str) -> SessionConfig
Create a session config for SSH with a specific identity file.
Sourcepub fn vagrant_ssh() -> SessionConfig
pub fn vagrant_ssh() -> SessionConfig
Create a session config for Vagrant SSH.
Sourcepub fn vagrant_ssh_machine(machine: &str) -> SessionConfig
pub fn vagrant_ssh_machine(machine: &str) -> SessionConfig
Create a session config for Vagrant SSH to a specific machine.
Sourcepub fn sftp(host: &str) -> SessionConfig
pub fn sftp(host: &str) -> SessionConfig
Create a session config for SFTP.
Sourcepub fn sftp_user(user: &str, host: &str) -> SessionConfig
pub fn sftp_user(user: &str, host: &str) -> SessionConfig
Create a session config for SFTP with user.
Sourcepub fn ftp(host: &str) -> SessionConfig
pub fn ftp(host: &str) -> SessionConfig
Create a session config for FTP.
Sourcepub fn netcat(host: &str, port: u16) -> SessionConfig
pub fn netcat(host: &str, port: u16) -> SessionConfig
Create a session config for netcat interactive mode.
Sourcepub fn socat(address: &str) -> SessionConfig
pub fn socat(address: &str) -> SessionConfig
Create a session config for socat interactive mode.
Sourcepub fn minicom(device: &str) -> SessionConfig
pub fn minicom(device: &str) -> SessionConfig
Create a session config for minicom serial terminal.
Sourcepub fn screen_serial(device: &str, baud_rate: u32) -> SessionConfig
pub fn screen_serial(device: &str, baud_rate: u32) -> SessionConfig
Create a session config for screen serial terminal.
Sourcepub fn picocom(device: &str, baud_rate: u32) -> SessionConfig
pub fn picocom(device: &str, baud_rate: u32) -> SessionConfig
Create a session config for picocom serial terminal.
Sourcepub fn aws_ssm(instance_id: &str) -> SessionConfig
pub fn aws_ssm(instance_id: &str) -> SessionConfig
Create a session config for AWS SSM session.
Sourcepub fn az_serial_console(resource_group: &str, vm_name: &str) -> SessionConfig
pub fn az_serial_console(resource_group: &str, vm_name: &str) -> SessionConfig
Create a session config for Azure VM serial console.
Sourcepub fn gcloud_ssh(instance: &str, zone: &str) -> SessionConfig
pub fn gcloud_ssh(instance: &str, zone: &str) -> SessionConfig
Create a session config for GCP SSH.
Sourcepub fn evcxr() -> SessionConfig
pub fn evcxr() -> SessionConfig
Create a session config for Rust REPL (evcxr).
Sourcepub fn gore() -> SessionConfig
pub fn gore() -> SessionConfig
Create a session config for Go playground.
Sourcepub fn php() -> SessionConfig
pub fn php() -> SessionConfig
Create a session config for PHP interactive mode.
Sourcepub fn swift() -> SessionConfig
pub fn swift() -> SessionConfig
Create a session config for Swift REPL.
Sourcepub fn kotlin() -> SessionConfig
pub fn kotlin() -> SessionConfig
Create a session config for Kotlin REPL.
Sourcepub fn groovysh() -> SessionConfig
pub fn groovysh() -> SessionConfig
Create a session config for Groovy console.
Sourcepub fn ts_node() -> SessionConfig
pub fn ts_node() -> SessionConfig
Create a session config for TypeScript REPL (ts-node).
Sourcepub fn deno() -> SessionConfig
pub fn deno() -> SessionConfig
Create a session config for Deno REPL.
Sourcepub fn bun() -> SessionConfig
pub fn bun() -> SessionConfig
Create a session config for Bun REPL.
Sourcepub fn default_shell() -> String
pub fn default_shell() -> String
Get the default shell for the current platform.