### Full Theme Configuration Example Source: https://github.com/zellij-org/zellij/blob/main/docs/MANPAGE.md Example of a complete color theme definition in a configuration file. Includes all standard color names. ```yaml themes: default: fg: [0,0,0] bg: [0,0,0] black: [0,0,0] red: [0,0,0] green: [0,0,0] yellow: [0,0,0] blue: [0,0,0] magenta: [0,0,0] cyan: [0,0,0] white: [0,0,0] orange: [0,0,0] ``` -------------------------------- ### Install Zellij on Void Linux Source: https://github.com/zellij-org/zellij/blob/main/docs/THIRD_PARTY_INSTALL.md Install Zellij using the xbps-install command on Void Linux. ```bash sudo xbps-install zellij ``` -------------------------------- ### Install Zellij from Private Registry Source: https://github.com/zellij-org/zellij/blob/main/docs/RELEASE.md This command installs the zellij binary from the private 'ktra' registry into a specified local directory. This is useful for testing the released version without affecting the system-wide installation. ```bash cargo install --registry ktra --root /tmp zellij ``` -------------------------------- ### Install Zellij Source: https://github.com/zellij-org/zellij/blob/main/CONTRIBUTING.md Install the Zellij binary to a specified directory using the xtask build system. Ensure the path is correctly provided. ```sh cargo xtask install /path/of/zellij/binary ``` -------------------------------- ### Install Zellij on MacOS (Homebrew) Source: https://github.com/zellij-org/zellij/blob/main/docs/THIRD_PARTY_INSTALL.md Install Zellij using Homebrew on MacOS. ```bash brew install zellij ``` -------------------------------- ### Install Zellij on Fedora Linux Source: https://github.com/zellij-org/zellij/blob/main/docs/THIRD_PARTY_INSTALL.md Enable the Zellij COPR repository and install the Zellij package using dnf. ```bash sudo dnf copr enable varlad/zellij sudo dnf install zellij ``` -------------------------------- ### Execute Installed Zellij Binary Source: https://github.com/zellij-org/zellij/blob/main/docs/RELEASE.md This command executes the zellij binary that was installed from the private registry. It helps verify that the installation and the binary itself are working correctly. ```bash $ /tmp/bin/zellij ``` -------------------------------- ### Install Zellij on Arch Linux (Official) Source: https://github.com/zellij-org/zellij/blob/main/docs/THIRD_PARTY_INSTALL.md Install the official Zellij package from the Arch Linux extra repository using pacman. ```bash pacman -S zellij ``` -------------------------------- ### Check Zellij Configuration Setup Source: https://github.com/zellij-org/zellij/blob/main/docs/MANPAGE.md Execute this command to identify potential issues with your zellij configuration files. ```bash zellij setup --check ``` -------------------------------- ### Install Zellij with Cargo Source: https://github.com/zellij-org/zellij/blob/main/README.md Installs Zellij using the Rust package manager, Cargo. Ensure you have Rust and Cargo installed. ```bash cargo install --locked zellij ``` -------------------------------- ### Install Zellij on Arch Linux (AUR) Source: https://github.com/zellij-org/zellij/blob/main/docs/THIRD_PARTY_INSTALL.md Install the Zellij development version from the AUR repository using an AUR helper like paru. ```bash paru -S zellij-git ``` -------------------------------- ### Install Zellij on MacOS (MacPorts) Source: https://github.com/zellij-org/zellij/blob/main/docs/THIRD_PARTY_INSTALL.md Install Zellij using MacPorts on MacOS. ```bash sudo port install zellij ``` -------------------------------- ### Launch Zellij without Installation (Bash/Zsh) Source: https://github.com/zellij-org/zellij/blob/main/README.md Launches Zellij directly from a script downloaded via curl. This is a convenient way to try Zellij without a formal installation. ```bash bash <(curl -L https://zellij.dev/launch) ``` -------------------------------- ### Zellij Keybinding Configuration Example Source: https://github.com/zellij-org/zellij/blob/main/docs/MANPAGE.md This YAML snippet demonstrates how to configure a custom keybinding in zellij to create a new tab and navigate to tab 1. ```yaml keybinds: normal: - action: [ NewTab, GoToTab: 1,] key: [ Char: 'c',] ``` -------------------------------- ### Run Zellij Development Environment Source: https://github.com/zellij-org/zellij/blob/main/README.md Starts a debug build of Zellij within the project directory. This command is used for development and testing purposes. ```bash cargo xtask run ``` -------------------------------- ### Example Zellij Layout Configuration Source: https://github.com/zellij-org/zellij/blob/main/docs/MANPAGE.md This YAML configuration defines a nested layout structure for zellij, specifying directions and split sizes for panes. ```yaml --- direction: Vertical parts: - direction: Horizontal split_size: Percent: 50 parts: - direction: Vertical split_size: Percent: 50 - direction: Vertical split_size: Percent: 50 - direction: Horizontal split_size: Percent: 50 ``` -------------------------------- ### Start Docker Compose for E2E Tests Source: https://github.com/zellij-org/zellij/blob/main/CONTRIBUTING.md Initiate the Docker containers required for running end-to-end tests. This command ensures the testing environment is up and running. ```sh docker compose up -d ``` -------------------------------- ### Launch Zellij without Installation (Fish/Xonsh) Source: https://github.com/zellij-org/zellij/blob/main/README.md Launches Zellij directly from a script downloaded via curl, specifically for Fish or Xonsh shells. This method ensures compatibility with these shells. ```bash bash -c 'bash <(curl -L https://zellij.dev/launch)' ``` -------------------------------- ### Add WASM Target for Rust Source: https://github.com/zellij-org/zellij/blob/main/default-plugins/layout-manager/README.md Before building, ensure the wasm32-wasi target is installed for Rust. ```bash rustup target add wasm32-wasi ``` -------------------------------- ### Example of ANSI/VT escape codes for text formatting Source: https://github.com/zellij-org/zellij/blob/main/docs/TERMINOLOGY.md Demonstrates how to use ANSI escape codes to format text, such as setting color and blinking effects. The `echo -e` command is used to interpret these escape sequences. ```bash echo -e "\033[31mHi \033[5mthere!" ``` -------------------------------- ### Handle Result with if let and log error Source: https://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md An example using `if let` to handle a Result, where errors are logged directly in the else branch. This can obscure the actual error details. ```rust if let Ok(active_tab) = self.get_active_tab(client_id) { let active_tab_pos = active_tab.position; let new_tab_pos = (active_tab_pos + 1) % self.tabs.len(); return self.switch_active_tab(new_tab_pos, client_id); } else { log::error!("Active tab not found for client_id: {:?}", client_id); } ``` -------------------------------- ### Log error message Source: https://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md A basic example of logging an error message directly. This is less informative than using Result types. ```rust log::error!("failed to find tab with index {tab_index}"); ``` -------------------------------- ### View Zellij Help and Flags Source: https://github.com/zellij-org/zellij/blob/main/docs/MANPAGE.md Run this command to display all available command-line flags and subcommands for zellij. ```bash zellij --help ``` -------------------------------- ### Setting Theme via Command Line Source: https://github.com/zellij-org/zellij/blob/main/docs/MANPAGE.md Command to specify a Zellij theme when launching the application. Replace [NAME] with your theme's name. ```bash zellij options --theme [NAME] ``` -------------------------------- ### Build Rust Plugin Source: https://github.com/zellij-org/zellij/blob/main/default-plugins/layout-manager/README.md Compile the Rust project to generate the WebAssembly plugin binary. ```bash cargo build ``` -------------------------------- ### Run Zellij Application Source: https://github.com/zellij-org/zellij/blob/main/CONTRIBUTING.md Execute the Zellij application using the build system's run command. Optionally, specify a layout to load. ```sh cargo xtask run ``` ```sh cargo xtask run -l strider ``` -------------------------------- ### Build, Format, Test, and Lint Zellij Source: https://github.com/zellij-org/zellij/blob/main/CONTRIBUTING.md Run the primary development workflow command for Zellij. This command formats the code, builds the project, and then executes tests and clippy for linting. ```sh cargo xtask ``` -------------------------------- ### Launch ktra Registry Server Source: https://github.com/zellij-org/zellij/blob/main/docs/RELEASE.md This command launches the ktra registry server with debug logging enabled. Ensure you are in the directory containing the ktra.toml configuration file. ```bash RUST_LOG=debug ktra ``` -------------------------------- ### Build Zellij for E2E Tests Source: https://github.com/zellij-org/zellij/blob/main/CONTRIBUTING.md Build the Zellij binary within the repository, making it available in the target folder for the Docker container. This step is crucial before running the end-to-end tests. ```sh cargo xtask ci e2e --build ``` -------------------------------- ### Original Resize Function Source: https://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md Illustrates the `resize_to_screen` function before error handling was improved, showing a direct call to `render` without error propagation. ```rust pub fn resize_to_screen(&mut self, new_screen_size: Size) { // ... self.render(); } ``` -------------------------------- ### Improved Context Messages for Clarity Source: https://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md Illustrates how to write more descriptive context messages by focusing on the action being performed rather than repeating the underlying error. ```rust pub fn render(&mut self) -> Result<()> { // ... for tab_index in tabs_to_close { // ... self.close_tab_at_index(tab_index) .context("Failed to close tab at index: {tab_index}")?; } // ... self.bus .senders .send_to_server(ServerInstruction::Render(Some(serialized_output))) .context("Failed to send message to server") } ``` -------------------------------- ### Simulate Release with Private Registry Source: https://github.com/zellij-org/zellij/blob/main/docs/RELEASE.md This command simulates the release process for Zellij, publishing crates to the specified cargo registry ('ktra') and git remote. Replace '' with the URL of your Zellij repository fork. ```bash cargo x publish --git-remote --cargo-registry ktra ``` -------------------------------- ### Individual Build System Commands Source: https://github.com/zellij-org/zellij/blob/main/CONTRIBUTING.md Execute specific tasks within the Zellij build system individually. These include formatting code, building the project, and running tests. ```sh cargo xtask format ``` ```sh cargo xtask build ``` ```sh cargo xtask test ``` -------------------------------- ### Attach to a Zellij Session Source: https://github.com/zellij-org/zellij/blob/main/docs/MANPAGE.md Connect to an existing zellij session by providing its name. ```bash zellij attach [session-name] ``` -------------------------------- ### Setting Theme in Configuration File Source: https://github.com/zellij-org/zellij/blob/main/docs/MANPAGE.md Configuration file setting to specify the default Zellij theme. Place this in your Zellij configuration file. ```yaml theme: [NAME] ``` -------------------------------- ### Load Plugin in Zellij Source: https://github.com/zellij-org/zellij/blob/main/default-plugins/layout-manager/README.md Load a compiled WebAssembly plugin into a running Zellij session. This command can be re-run to reload changes. ```bash zellij action start-or-reload-plugin file:target/wasm32-wasi/debug/rust-plugin-example.wasm ``` -------------------------------- ### Improved Resize Function with Result and Context Source: https://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md Shows the `resize_to_screen` function refactored to return a `Result<()>`, propagating errors from `render` and adding specific context. ```rust pub fn resize_to_screen(&mut self, new_screen_size: Size) -> Result<()> { // ... self.render() .with_context(|| format!("failed to resize to screen size: {new_screen_size:#?}")) } ``` -------------------------------- ### Importing Error Handling Utilities Source: https://github.com/zellij-org/zellij/blob/main/CONTRIBUTING.md Import necessary error handling utilities from zellij_utils::errors::prelude::. This is a prerequisite for implementing Result-based error handling. ```rust use zellij_utils::errors::prelude::*; ``` -------------------------------- ### Run E2E Tests Source: https://github.com/zellij-org/zellij/blob/main/CONTRIBUTING.md Execute the end-to-end tests for Zellij. This command runs the tests against the previously built binary within the Docker environment. ```sh cargo xtask ci e2e --test ``` -------------------------------- ### Improved Screen Render Function with Result Source: https://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md Demonstrates the `Screen::render` function after refactoring to return a `Result<()>`, using `with_context` for error messages. ```rust pub fn render(&mut self) -> Result<()> { let err_context = || "failed to render screen".to_string(); // ... let serialized_output = output.serialize(); self.bus .senders .send_to_server(ServerInstruction::Render(Some(serialized_output))) .with_context(err_context) } ``` -------------------------------- ### Enable Singlepass Compiler for Testing Source: https://github.com/zellij-org/zellij/blob/main/CONTRIBUTING.md Use this command to enable the singlepass compiler flag for testing plugins, which can speed up compilation at the cost of execution performance. ```sh cargo xtask run --singlepass ``` -------------------------------- ### List Running Zellij Sessions Source: https://github.com/zellij-org/zellij/blob/main/docs/MANPAGE.md Use this command to see all currently active zellij sessions. ```bash zellij list-sessions ``` -------------------------------- ### Publish Crates Source: https://github.com/zellij-org/zellij/blob/main/CONTRIBUTING.md Publish the `zellij` and `zellij-tile` crates to the registry using the xtask build system. This command is typically used for releasing new versions. ```sh cargo xtask publish ``` -------------------------------- ### Run Clippy for Linting Source: https://github.com/zellij-org/zellij/blob/main/CONTRIBUTING.md Execute the clippy linter via the xtask build system to check for common Rust programming errors and style issues. ```sh cargo xtask clippy ``` -------------------------------- ### Run All Zellij Tests Source: https://github.com/zellij-org/zellij/blob/main/README.md Executes all tests for the Zellij project. This is part of the development workflow to ensure code quality. ```bash cargo xtask test ``` -------------------------------- ### Create New User for ktra Registry Source: https://github.com/zellij-org/zellij/blob/main/docs/RELEASE.md This curl command creates a new user ('ALICE') for the ktra registry and obtains a registry token. The password provided in the JSON payload is for authentication with ktra itself, not for the git forge. ```bash curl -X POST -H 'Content-Type: application/json' -d '{"password":"PASSWORD"}' http://localhost:8000/ktra/api/v1/new_user/ALICE ``` -------------------------------- ### Handle Result with match and log non-fatally with context Source: https://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md Rewrite an `if let` to a `match` to properly handle errors. Wrap the error in a new Result, attach context, and log it non-fatally using `.non_fatal()`. ```rust match self.get_active_tab(client_id) { Ok(active_tab) => { let active_tab_pos = active_tab.position; let new_tab_pos = (active_tab_pos + 1) % self.tabs.len(); return self.switch_active_tab(new_tab_pos, client_id); }, Err(err) => Err::<(), _>(err).with_context(err_context).non_fatal(), } ``` -------------------------------- ### Create Cargo Index Repository Config Source: https://github.com/zellij-org/zellij/blob/main/docs/RELEASE.md This JSON configuration is used for the root of a new cargo index repository. It specifies the download and API URLs for the private registry. ```json {"dl":"http://localhost:8000/dl","api":"http://localhost:8000"} ``` -------------------------------- ### Attaching Static and Dynamic Context to Errors Source: https://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md Demonstrates using `context` for static error messages and `with_context` with a closure for dynamic error messages, including formatting. ```rust fn move_clients_between_tabs( &mut self, source_tab_index: usize, destination_tab_index: usize, clients_to_move: Option>, ) -> Result<()> { // ... if let Some(client_mode_info_in_source_tab) = drained_clients { let destination_tab = self.get_indexed_tab_mut(destination_tab_index) .context("failed to get destination tab by index") .with_context(|| format!("failed to move clients from tab {source_tab_index} to tab {destination_tab_index}"))?; // ... } Ok(()) } ``` -------------------------------- ### Original Screen Render Function Source: https://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md Shows the `Screen::render` function before error handling improvements, including an `unwrap()` call. ```rust pub fn render(&mut self) { // ... let serialized_output = output.serialize(); self.bus .senders .send_to_server(ServerInstruction::Render(Some(serialized_output))) .unwrap(); } ``` -------------------------------- ### Login to Private Cargo Registry Source: https://github.com/zellij-org/zellij/blob/main/docs/RELEASE.md This command logs the cargo client into the private 'ktra' registry using the obtained registry token. Replace 'KTRA_TOKEN' with the actual token received from the 'cargo login' command. ```bash cargo login --registry ktra "KTRA_TOKEN" ``` -------------------------------- ### Configure ktra Registry Server Source: https://github.com/zellij-org/zellij/blob/main/docs/RELEASE.md This TOML configuration file is used by the ktra registry server. It specifies the remote index URL, Git credentials, and the branch to use for the index. ```toml [index_config] remote_url = "https://$INDEX_REPO" https_username = "your-git-username" https_password = "$TOKEN" branch = "main" # Or whatever branch name you used ``` -------------------------------- ### Dump Focused Pane to STDOUT Source: https://github.com/zellij-org/zellij/blob/main/docs/MANPAGE.md Dumps the content of the currently focused pane to standard output. This action is useful for capturing pane content without specifying a file. ```bash zellij dump-screen ``` -------------------------------- ### Returning Results with Context Source: https://github.com/zellij-org/zellij/blob/main/CONTRIBUTING.md Append `.context()` to any Result to add a sensible error description. This is part of Zellij's error handling strategy to provide more informative error messages. ```rust .context("some sensible error description") ``` -------------------------------- ### Log Information in Rust Source: https://github.com/zellij-org/zellij/blob/main/CONTRIBUTING.md Use the `log` crate in Rust to record informational messages during runtime. This snippet demonstrates how to log a variable's value for debugging purposes. ```rust let my_variable = some_function(); log::info!("my variable is: {:?}", my_variable); ``` -------------------------------- ### Dump Specific Pane to a File Source: https://github.com/zellij-org/zellij/blob/main/docs/MANPAGE.md Dumps the content of a specified pane (by ID) to a given file path. This allows for targeted saving of pane contents. ```bash zellij dump-screen: [File] [--pane-id ] ``` -------------------------------- ### Handling Specific Zellij Errors Source: https://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md Demonstrates how to recover a specific `ZellijError` variant from an `anyhow::Error` and react to it. This is useful when you need to differentiate between various underlying error conditions. ```rust match pty .spawn_terminal(terminal_action, client_or_tab_index) .with_context(err_context) // <-- Note how we attach a context, but can // still recover the error below! { Ok(_) => { // ... Whatever }, Err(err) => match err.downcast_ref::() { Some(ZellijError::CommandNotFound { terminal_id, .. }) => { // Do something now that this error occured. // We can even access the values stored inside it, "terminal_id" in // this case }, // You can check for other error variants here _ => { // Some other error, which we haven't checked for, occured here. // Now we can, for example, log it! Err::<(), _>(err).non_fatal(), }, }, } ``` -------------------------------- ### 256 Color Theme Definition Source: https://github.com/zellij-org/zellij/blob/main/docs/MANPAGE.md Defines a color theme using 256 color values. This is a common format for terminal color support. ```yaml fg: 0 ``` -------------------------------- ### Generating Ad-hoc Errors Source: https://github.com/zellij-org/zellij/blob/main/CONTRIBUTING.md Use `anyhow!` macro to generate ad-hoc errors with a custom message when a specific error variant is not needed. This is useful for quick error reporting. ```rust anyhow!("SOME MESSAGE") ``` -------------------------------- ### Handle Screen Rendering Errors Source: https://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md Propagates errors from screen rendering operations. Errors are propagated up to the caller, `init_session`, where execution is terminated. ```rust ScreenInstruction::Render => { screen.render()?; }, ScreenInstruction::NewPane(pid, client_or_tab_index) => { // ... screen.update_tabs()?; screen.render()?; }, ScreenInstruction::OpenInPlaceEditor(pid, client_id) => { // ... screen.update_tabs()?; screen.render()?; }, ``` -------------------------------- ### Update Manpage Source: https://github.com/zellij-org/zellij/blob/main/CONTRIBUTING.md Generate or update the Zellij manpage using the xtask build system. This command relies on the markdown file in docs/MANPAGE.md. ```sh cargo xtask manpage ``` -------------------------------- ### Truecolor Theme Definition Source: https://github.com/zellij-org/zellij/blob/main/docs/MANPAGE.md Defines a color theme using truecolor values. Use this for precise color definitions. ```yaml fg: [0, 0, 0] ``` -------------------------------- ### Add Private Cargo Registry to .cargo/config.toml Source: https://github.com/zellij-org/zellij/blob/main/docs/RELEASE.md This TOML snippet adds a new private cargo registry named 'ktra' to the local .cargo/config.toml file. It points to the custom index repository. ```toml [registries] ktra = { index = "https://$INDEX_REPO" } ``` -------------------------------- ### Using a Variable for Error Context Source: https://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md Shows how to store error context in a variable to avoid repetition when calling `context` multiple times. ```rust pub fn render(&mut self) -> Result<()> { let err_context = "failed to render screen"; // ... for tab_index in tabs_to_close { // ... self.close_tab_at_index(tab_index) .context(err_context)?; } // ... self.bus .senders .send_to_server(ServerInstruction::Render(Some(serialized_output))) .context(err_context) } // ... pub fn close_tab(&mut self, client_id: ClientId) -> Result<()> { let err_context = || format!("failed to close tab for client {client_id:?}"); let active_tab_index = *self .active_tab_indices .get(&client_id) .with_context(err_context)?; self.close_tab_at_index(active_tab_index) .with_context(err_context) } ``` -------------------------------- ### Handle Result with context and log non-fatally Source: https://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md Use `.context()` and `.non_fatal()` on a Result to log errors with attached context without stopping execution. This is suitable when the Ok type is `()`. ```rust fs::create_dir_all(&plugin_global_data_dir) .context("failed to create plugin asset directory") .non_fatal(); ``` -------------------------------- ### Undo Local Commit Source: https://github.com/zellij-org/zellij/blob/main/docs/RELEASE.md This command reverts the last commit made in the local zellij repository. Use this during cleanup to undo changes made for the release simulation. ```bash git reset --hard HEAD~1 ``` -------------------------------- ### Handle Option with Context Source: https://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md Attaches context messages to Option types when a None value is considered an error. This provides a message explaining why the None is an error and what the surrounding operation was trying to achieve. ```rust let destination_tab = self.get_indexed_tab_mut(destination_tab_index) .context("failed to get destination tab by index") .with_context(|| format!("failed to move clients from tab {source_tab_index} to tab {destination_tab_index}"))?; ``` -------------------------------- ### Hex Color Theme Definition Source: https://github.com/zellij-org/zellij/blob/main/docs/MANPAGE.md Defines a color theme using hexadecimal color codes. Supports both shorthand and full hex values. ```yaml fg: "#000000" bg: "#000" ``` -------------------------------- ### Modify Cargo.toml for Private Registry Dependency Source: https://github.com/zellij-org/zellij/blob/main/docs/RELEASE.md This TOML snippet shows how to modify a crate's Cargo.toml to use a private registry. It changes a local path dependency to a registry-based dependency. ```toml zellij-utils = { path = "../zellij-utils/", version = "XXX", registry = "ktra" } ``` -------------------------------- ### Terminate Execution with .fatal() Source: https://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md Terminates the zellij application by panicking after logging the error. This is used when errors cannot be propagated further, such as from a separate thread. ```rust screen_thread_main( screen_bus, max_panes, client_attributes_clone, config_options, ) .fatal(); ``` -------------------------------- ### Force Push to Remote Fork Source: https://github.com/zellij-org/zellij/blob/main/docs/RELEASE.md This command forces a push to the specified remote zellij fork, overwriting the remote history. This is used during cleanup to remove the simulated release commit from the remote repository. ```bash git push --force ``` -------------------------------- ### Delete Local Release Tag Source: https://github.com/zellij-org/zellij/blob/main/docs/RELEASE.md This command deletes a local release tag. Replace 'vX.Y.Z' with the actual tag name of the release you are cleaning up. ```bash git tag -d "vX.Y.Z" ``` -------------------------------- ### Logging Non-Fatal Errors Source: https://github.com/zellij-org/zellij/blob/main/CONTRIBUTING.md Use the `.non_fatal()` method on a Result type instead of `log::error!` for logging errors that do not necessarily halt execution. Ensure context is attached before logging. ```rust Err::<(), _>(err).non_fatal() ``` -------------------------------- ### Unbind All Default Zellij Keybindings Source: https://github.com/zellij-org/zellij/blob/main/docs/MANPAGE.md Configure zellij to unbind all default keybindings across all modes by setting 'unbind' to true. ```yaml keybinds: unbind: true ``` -------------------------------- ### Unbind Specific Default Zellij Keybindings Source: https://github.com/zellij-org/zellij/blob/main/docs/MANPAGE.md Unbind specific default keybindings, like Ctrl+P, for all modes in zellij. ```yaml keybinds: unbind: [ Ctrl: 'p'] ``` -------------------------------- ### Downcasting to ZellijError Source: https://github.com/zellij-org/zellij/blob/main/CONTRIBUTING.md Use `anyhow::Error::downcast_ref::()` to recover underlying Zellij-specific errors from a general `anyhow::Error`. This is useful when handling specific error types. ```rust anyhow::Error::downcast_ref::() ``` -------------------------------- ### Unbind All Default Keybindings for a Specific Mode Source: https://github.com/zellij-org/zellij/blob/main/docs/MANPAGE.md This configuration unbinds all default keybindings specifically for the 'normal' mode in zellij. ```yaml keybinds: normal: - unbind: true ``` -------------------------------- ### Delete Remote Release Tag Source: https://github.com/zellij-org/zellij/blob/main/docs/RELEASE.md This command deletes a release tag from the remote zellij repository. Use this during cleanup to remove the simulated release tag from the remote. Replace 'vX.Y.Z' with the actual tag name. ```bash git push --force --delete "vX.Y.Z" ``` -------------------------------- ### Binding Newline Character in Zellij Config Source: https://github.com/zellij-org/zellij/blob/main/example/README.md When binding the newline character in Zellij's configuration, use double quotes. This ensures the newline character is correctly interpreted. ```zellij-config Ctrl: "\n" ``` ```zellij-config Ctrl: '\n' ``` -------------------------------- ### Unbind Specific Default Keybindings for a Specific Mode Source: https://github.com/zellij-org/zellij/blob/main/docs/MANPAGE.md Unbinds specific default keybindings, such as Alt+N and Ctrl+G, for the 'normal' mode in zellij. ```yaml keybinds: normal: - unbind: [ Alt: 'n', Ctrl: 'g'] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.