### Quick Start Installation for Veil Source: https://github.com/egorlem/veil.zsh/blob/main/README.md This code block demonstrates the essential steps to quickly set up Veil. It involves cloning the repository and sourcing the main Veil script in your .zshrc file. ```shell # Clone Veil repository git clone https://github.com/egorlem/veil.zsh ~/.veil # Source Veil in your .zshrc (includes Ultima theme) echo 'source ~/.veil/veil.zsh' >> ~/.zshrc ``` -------------------------------- ### Setup Veil Keybindings Source: https://github.com/egorlem/veil.zsh/blob/main/components/modules/README.md Provides a structure for defining custom Zsh keybindings. Keybindings are commented by default, allowing users to uncomment examples or add their own to personalize their command-line environment. ```shell __veilKeybindingsSetup() { # Edit commands # bindkey '^U' backward-kill-line # bindkey '^W' backward-kill-word # ... return 0 } ``` -------------------------------- ### Install and Load Veil.zsh Module System Source: https://context7.com/egorlem/veil.zsh/llms.txt Demonstrates the basic installation of Veil.zsh and how to load specific modules or enable verbose output for debugging. It also shows how to specify modules using an array. ```bash # Basic standalone installation and usage git clone https://github.com/egorlem/veil.zsh ~/.veil echo 'source ~/.veil/veil.zsh' >> ~/.zshrc source ~/.zshrc # Custom module selection (define before sourcing) VEIL_MODULES="completion history navigation less ls" source ~/.veil/veil.zsh # Enable verbose output for debugging VEIL_VERBOSE=1 VEIL_MODULES_VERBOSE=1 VEIL_MODULES="completion history" source ~/.veil/veil.zsh # Output: # veil: module 'completion' loaded successfully # veil/completion: module initialized with cache # veil: module 'history' loaded successfully # veil/history: initialized (HISTSIZE: 100000) # Array format for module specification VEIL_MODULES=(completion history navigation aliases keybindings) source ~/.veil/veil.zsh ``` -------------------------------- ### Setup Veil Aliases Source: https://github.com/egorlem/veil.zsh/blob/main/components/modules/README.md Defines shell aliases for common commands, providing examples for Git and a fun utility. Users can uncomment existing aliases or add new ones to customize their terminal shortcuts. ```shell __veilAliasesSetup() { # Fun utility - Matrix reference alias stay="printf '\x1b[32mFollow the white rabbit...\x1b[0m\n'" # Git alias examples # alias gs='git status' # alias ga='git add' # alias gc='git commit' # alias gp='git push' # ... return 0 } ``` -------------------------------- ### Develop Custom Veil.zsh Modules Source: https://context7.com/egorlem/veil.zsh/llms.txt Provides a template and example for creating custom modules within the Veil.zsh framework. It outlines the structure, initialization, dependency checking, and alias setup for a custom module, using Docker as an example. ```bash # Create custom module file # ~/.veil/components/modules/docker.module.zsh # Module implementation typeset -gi _VEIL_DOCKER_MODULE_LOADED=${_VEIL_DOCKER_MODULE_LOADED:-0} __veilDockerDeps() { if ! command -v docker >/dev/null 2>&1; then [[ -n "$VEIL_MODULES_VERBOSE" ]] && echo "veil/docker: error - docker not found" >&2 return 1 fi return 0 } __veilDockerSetupAliases() { alias dps='docker ps' alias di='docker images' alias dex='docker exec -it' alias dlog='docker logs -f' alias dstop='docker stop $(docker ps -q)' return 0 } veilDockerInit() { [[ $_VEIL_DOCKER_MODULE_LOADED -eq 1 ]] && return 0 _VEIL_DOCKER_MODULE_LOADED=1 if ! __veilDockerDeps; then return 1 fi __veilDockerSetupAliases [[ -n "$VEIL_MODULES_VERBOSE" ]] && echo "veil/docker: module initialized" >&2 return 0 } [[ -n "$VEIL_CORE_LOADED" ]] && veilDockerInit # Cleanup typeset -a _VEIL_CLEANUP_FUNCS=( __veilDockerDeps __veilDockerSetupAliases ) unset -f $_VEIL_CLEANUP_FUNCS unset _VEIL_CLEANUP_FUNCS # Load custom module VEIL_MODULES="completion history docker" source ~/.veil/veil.zsh # veil: module 'docker' loaded successfully # veil/docker: module initialized # Use custom aliases dps # Output: (docker ps output) dlog container-name # Output: (live container logs) ``` -------------------------------- ### Project Structure Example Source: https://github.com/egorlem/veil.zsh/blob/main/README.md This snippet illustrates the directory structure for Veil's configuration modules and themes. It shows how different components are organized within the ~/.veil directory. ```shell ~/.veil/components/modules ├── completion.module.zsh ├── history.module.zsh └── ... ~/.veil/components/themes ├── ultima.zsh-theme └── ... ``` -------------------------------- ### Load Environment Module in Zsh Source: https://context7.com/egorlem/veil.zsh/llms.txt Demonstrates how to load the 'env' module for Veil.zsh, which provides a blank canvas for setting personal environment variables without imposed defaults. It includes an example setup function. ```bash # Load environment module VEIL_MODULES="env" source ~/.veil/veil.zsh # Edit module to set your variables # ~/.veil/components/modules/env.module.zsh # Example configuration (uncomment to use) __veilEnvSetup() { export EDITOR='nvim' export VISUAL='nvim' export PAGER='less' export LANG='en_US.UTF-8' export LC_ALL='en_US.UTF-8' export MANWIDTH=80 export PATH="$HOME/.local/bin:$PATH" return 0 } # Reload after editing source ~/.veil/veil.zsh # Verify environment variables echo $EDITOR # Output: nvim echo $PATH # Output: /home/user/.local/bin:/usr/local/bin:/usr/bin:/bin ``` -------------------------------- ### Integrate Veil.zsh with Plugin Managers Source: https://context7.com/egorlem/veil.zsh/llms.txt Provides examples of how to integrate Veil.zsh with popular Zsh plugin managers like Oh My Zsh, Zim Framework, and zcomet. It also includes a generic example for other plugin managers. ```bash # Oh My Zsh integration git clone https://github.com/egorlem/veil.zsh ~/.oh-my-zsh/custom/plugins/veil # In .zshrc: VEIL_MODULES="completion history navigation" plugins=(git veil) source ~/.oh-my-zsh/oh-my-zsh.sh # Zim Framework integration # In .zimrc: # zmodule egorlem/veil.zsh -n veil # zcomet integration # In .zshrc: # zcomet load egorlem/veil.zsh # Generic plugin manager source /path/to/veil.plugin.zsh ``` -------------------------------- ### Leverage Veil.zsh Completion Module Source: https://context7.com/egorlem/veil.zsh/llms.txt Explains the capabilities of the Veil.zsh completion module, such as caching, case-insensitive matching, fuzzy search, grouped results, and menu selection. It provides examples for context-aware and SSH host completion. ```bash # Load completion module VEIL_MODULES="completion" source ~/.veil/veil.zsh # Tab completion with context awareness git che # Shows: # › commands # checkout cherry cherry-pick # Case-insensitive completion cd Doc # Matches: Documents, documents, DOCUMENTS # Partial and fuzzy matching git c-m # Matches: commit, cherry-pick, etc. # SSH host completion from known_hosts ssh myse # Completes to: ssh myserver.com # Menu selection with multiple matches ls ~/.z # › directories ``` -------------------------------- ### Setup Git, Docker, and System Aliases in Zsh Source: https://context7.com/egorlem/veil.zsh/llms.txt Defines common aliases for Git, Docker, and system commands to streamline shell operations. These aliases are part of the Veil.zsh project and can be uncommented to be activated. ```bash __veilAliasesSetup() { alias stay="printf '\x1b[32mFollow the white rabbit...\x1b[0m\n'" # Git shortcuts alias gs='git status' alias ga='git add' alias gc='git commit' alias gp='git push' alias gl='git log --oneline --graph --all' alias gd='git diff' # Docker shortcuts alias dps='docker ps' alias di='docker images' alias dex='docker exec -it' # System shortcuts alias update='sudo apt update && sudo apt upgrade' alias cls='clear' return 0 } # Reload and test source ~/.veil/veil.zsh gs # Output: (git status output) ``` -------------------------------- ### Integrate Veil with Oh My Zsh Source: https://github.com/egorlem/veil.zsh/blob/main/components/README.md Installs Veil into the Oh My Zsh custom plugins directory and configures its usage. Optionally, specify `VEIL_MODULES` and add `veil` to the `plugins` array in `.zshrc`. ```shell # 1. Install into custom/plugins/ git clone https://github.com/egorlem/veil.zsh ~/.oh-my-zsh/custom/plugins/veil # 2. Optionally select modules # VEIL_MODULES="completion history" # 3. Add to .zshrc # plugins=(git veil) ``` -------------------------------- ### Load Aliases Module in Zsh Source: https://context7.com/egorlem/veil.zsh/llms.txt Shows how to load the 'aliases' module for Veil.zsh, which serves as a customizable canvas for personal command shortcuts. It includes a default 'stay' alias and mentions examples for git, docker, and system commands. ```bash # Load aliases module VEIL_MODULES="aliases" source ~/.veil/veil.zsh # Default fun utility stay # Output: Follow the white rabbit... # Edit module to add your aliases # ~/.veil/components/modules/aliases.module.zsh ``` -------------------------------- ### Configure Custom Theme Directory for Veil (Zsh) Source: https://github.com/egorlem/veil.zsh/blob/main/components/README.md Specifies a custom directory for Veil themes, allowing themes to be stored outside the default Veil installation. Set `THEMES_DIR` and `THEME` before sourcing Veil. ```shell THEMES_DIR="$HOME/my-zsh-themes" THEME="my-custom-theme" source "$HOME/.veil/veil.zsh" ``` -------------------------------- ### Create a Custom Veil Module Source: https://github.com/egorlem/veil.zsh/blob/main/components/modules/README.md Demonstrates how to create and load a custom Veil module. A minimal module includes an initialization function and is sourced by Veil if placed in the correct directory and added to `VEIL_MODULES`. ```shell # ~/.veil/components/modules/example.module.zsh veilExampleInit() { echo "My module loaded" return 0 } [[ -n "$VEIL_CORE_LOADED" ]] && veilExampleInit ``` -------------------------------- ### Navigation Module: Auto-cd and Parent Directory Shortcuts in Zsh Source: https://context7.com/egorlem/veil.zsh/llms.txt Shows how to use the 'auto-cd' feature to navigate directories by simply typing their names, and demonstrates the use of shortcuts like '..', '...', etc., for moving up the directory tree. ```bash # Auto-cd: type directory name without 'cd' /etc pwd # Output: /etc ~/Documents/Projects pwd # Output: /home/user/Documents/Projects # Parent directory shortcuts .. # cd .. ... # cd ../.. .... # cd ../../.. ..... # cd ../../../.. ``` -------------------------------- ### Manually Source Veil Plugin for Any System (Zsh) Source: https://github.com/egorlem/veil.zsh/blob/main/components/README.md Provides a generic method to integrate Veil into any Zsh environment by sourcing the `veil.plugin.zsh` file directly. This allows module control via `VEIL_MODULES`. ```shell source /path/to/veil.plugin.zsh ``` -------------------------------- ### Load Navigation Module in Zsh Source: https://context7.com/egorlem/veil.zsh/llms.txt Demonstrates how to load the 'navigation' module for Veil.zsh to enable enhanced directory navigation features like auto-cd, parent directory shortcuts, and a managed directory stack. ```bash # Load navigation module VEIL_MODULES="navigation" source ~/.veil/veil.zsh ``` -------------------------------- ### Configure Zsh Completion System Source: https://github.com/egorlem/veil.zsh/blob/main/components/modules/README.md Initializes and configures the Zsh completion system using mechanisms like compinit and zstyle. It defines completion style, order, sources, and interactive behavior for a context-aware and efficient user experience. ```shell # compinit # zstyle # Completion widgets # Matcher-list and menu-selection # (Detailed logic and motivation for specific settings are documented in the module code.) ``` -------------------------------- ### Ls Module: Enhanced Listing Commands in Zsh Source: https://context7.com/egorlem/veil.zsh/llms.txt Demonstrates the use of enhanced 'ls' aliases provided by the Veil.zsh 'ls' module: 'ls' for colored output, 'll' and 'la' for detailed listings, and 'l' for a compact format with indicators. ```bash # Colored ls output (auto-detected platform) ls # Output with colors on supported terminals # Detailed listing with all files ll # Output: # total 48 # drwxr-xr-x 5 user group 4096 Jan 10 12:00 . # drwxr-xr-x 20 user group 4096 Jan 10 11:50 .. # -rw-r--r-- 1 user group 3899 Jan 10 12:00 README.md # drwxr-xr-x 4 user group 4096 Jan 10 12:00 components # Alternative detailed listing la # Same as ll # Compact format with indicators l # Output: # components/ README.md veil.zsh* ``` -------------------------------- ### Integrate Veil with zcomet (Zsh) Source: https://github.com/egorlem/veil.zsh/blob/main/components/README.md Loads Veil using the zcomet plugin manager. This command should be added to your `.zshrc` file to enable Veil integration. ```shell # In .zshrc zcomet load egorlem/veil.zsh ``` -------------------------------- ### Select Veil Theme (Zsh) Source: https://github.com/egorlem/veil.zsh/blob/main/components/README.md Sets the theme for Veil. The default is `ultima`, but any `.zsh-theme` file can be specified. Ensure the `THEME` variable is set before sourcing Veil. ```shell THEME="ultima" source "$HOME/.veil/veil.zsh" ``` -------------------------------- ### Navigation Module: Directory Stack Management in Zsh Source: https://context7.com/egorlem/veil.zsh/llms.txt Illustrates how the navigation module manages a directory stack, allowing users to push directories, view the stack, and jump to directories by their stack number. It also highlights automatic de-duplication. ```bash # Directory stack management cd ~/project1 cd ~/project2 cd ~/project3 d # Output: # 0 ~/project3 # 1 ~/project2 # 2 ~/project1 # Jump to directory by stack number 2 pwd # Output: /home/user/project1 # Stack automatically managed (no duplicates) cd ~/documents cd ~/downloads cd ~/documents # Won't create duplicate d # Output: # 0 ~/documents # 1 ~/downloads ``` -------------------------------- ### Ls Module: Platform Detection and Fallback in Zsh Source: https://context7.com/egorlem/veil.zsh/llms.txt Explains how the Veil.zsh 'ls' module automatically detects the operating system to use the correct flags for colored output (e.g., '-G' on macOS/BSD, '--color=auto' on Linux/GNU). It also shows the fallback behavior when color configurations are missing. ```bash # Platform detection (automatic) # macOS/BSD: ls -G # Linux/GNU: ls --color=auto # Unknown: plain ls (no color) # Works without LS_COLORS/LSCOLORS (warning shown) unset LS_COLORS source ~/.veil/veil.zsh # veil/ls: warning - colors not configured, ls will be without colors ``` -------------------------------- ### Configure Ultima Zsh Prompt Theme Source: https://context7.com/egorlem/veil.zsh/llms.txt Demonstrates the configuration of the Ultima prompt theme in Veil.zsh, which displays VCS status, SSH connections, current directory, and exit status. It supports customization for untracked files and different VCS types. ```bash # Load with default settings source ~/.veil/veil.zsh # Prompt structure: # ┌──────────────────────────────────────────────────────────── # └ ~/project on › main # › # SSH connection shown ssh user@server # ┌──────────────────────────────────────────────────────────── # └ SSH: ~/project on › main # › # Git status indicators cd ~/project git status # ┌──────────────────────────────────────────────────────────── # └ ~/project A › M › on › main # › # A = staged changes (green) # M = unstaged changes (cyan) # U = untracked files (blue) # Exit status indicator (right prompt) false # › • 1 (red dot with exit code) true # › • (green dot, no error) # Disable untracked files detection ULTIMA_GIT_NO_UNTRACKED=1 source ~/.veil/veil.zsh # Select different VCS VCS="svn" # Options: git, svn, hg source ~/.veil/veil.zsh # Git action display (rebase, merge, cherry-pick) git rebase -i HEAD~3 # ┌──────────────────────────────────────────────────────────── # └ ~/project REBASE › abc123 › on › main # › # Secondary prompt (multi-line commands) for i in 1 2 3; do # for › echo $i # for › done ``` -------------------------------- ### Load Less Module in Zsh Source: https://context7.com/egorlem/veil.zsh/llms.txt Shows how to load the 'less' module for Veil.zsh, which configures 'less' for enhanced viewing with terminal-specific optimizations, colorful man pages, and convenient search and tail functionalities. ```bash # Load less module VEIL_MODULES="less" source ~/.veil/veil.zsh ``` -------------------------------- ### Configure Veil Modules via Variables (Zsh) Source: https://github.com/egorlem/veil.zsh/blob/main/components/README.md Specifies which Veil modules will be loaded. Supports both space-separated strings and Zsh arrays. Ensure these variables are set before sourcing Veil. ```shell # String (space-separated) VEIL_MODULES="aliases completion history" # Zsh array VEIL_MODULES=(aliases completion history) # Example usage: VEIL_MODULES="completion history navigation less" source "$HOME/.veil/veil.zsh" ``` -------------------------------- ### Configure Veil.zsh Theme Loading Source: https://context7.com/egorlem/veil.zsh/llms.txt Illustrates how to configure Veil.zsh to use its default theme, a custom theme by name, or a custom theme from a specified directory. It also shows how theme auto-loading is disabled in plugin mode. ```bash # Default theme (ultima) source ~/.veil/veil.zsh # Custom theme selection THEME="my-custom-theme" source ~/.veil/veil.zsh # Custom theme directory THEMES_DIR="$HOME/my-zsh-themes" THEME="my-theme" source ~/.veil/veil.zsh # Place custom theme in default location cp my-theme.zsh-theme ~/.veil/components/themes/ THEME="my-theme" source ~/.veil/veil.zsh # Plugin mode (theme auto-loading disabled) source ~/.veil/veil.plugin.zsh ``` -------------------------------- ### Load Ls Module in Zsh Source: https://context7.com/egorlem/veil.zsh/llms.txt Instructions to load the 'ls' module for Veil.zsh, which provides cross-platform colored output for the 'ls' command and convenient aliases like 'll', 'la', and 'l'. ```bash # Load ls module VEIL_MODULES="ls" source ~/.veil/veil.zsh ``` -------------------------------- ### Integrate Veil with Zim Framework (Zsh) Source: https://github.com/egorlem/veil.zsh/blob/main/components/README.md Adds Veil as a module to the Zim Framework. This is done by specifying the repository and a module name in the `.zimrc` file. ```shell # In .zimrc zmodule egorlem/veil.zsh -n veil ``` -------------------------------- ### Enable Verbose Debugging in Veil (Zsh) Source: https://github.com/egorlem/veil.zsh/blob/main/components/README.md Enables verbose output for debugging module loading. `VEIL_VERBOSE` controls system core output, while `VEIL_MODULES_VERBOSE` controls output from individual modules. Set these before sourcing Veil. ```shell VEIL_VERBOSE=1 VEIL_MODULES_VERBOSE=1 source "$HOME/.veil/veil.zsh" ``` -------------------------------- ### Utilize Veil.zsh History Module Source: https://context7.com/egorlem/veil.zsh/llms.txt Details the features of the Veil.zsh history module, including persistent storage, deduplication, timestamp recording, and cross-session sharing. It shows how to view, search, and notes commands not saved. ```bash # Load history module VEIL_MODULES="history" source ~/.veil/veil.zsh # View full history with line numbers history # Output: # 1 ls -la # 2 cd ~/.veil # 3 git status # ... # Quick history view (alias) h # Same output as history # History search with grep (commands are deduplicated) history | grep git # Output: # 15 git status # 42 git commit -m "Initial commit" # 87 git push origin main # Commands starting with space are not saved secret-command-not-saved history | tail -5 # secret-command-not-saved will not appear # History verification in module code # HISTFILE: ~/.zsh_history # HISTSIZE: 100000 # SAVEHIST: 100000 # Options: EXTENDED_HISTORY, HIST_IGNORE_DUPS, SHARE_HISTORY ``` -------------------------------- ### Integrate Veil as a Plugin (Zsh) Source: https://github.com/egorlem/veil.zsh/blob/main/components/README.md Uses `veil.plugin.zsh` for integration with other plugin managers. This automatically sets `VEIL_MODE` to `plugin` and disables theme auto-loading, allowing Veil modules to function within other systems. ```shell source "$HOME/.veil/veil.plugin.zsh" ``` -------------------------------- ### Configure Colored ls Output in Zsh (ls.module.zsh) Source: https://github.com/egorlem/veil.zsh/blob/main/components/modules/README.md This Zsh module enhances the 'ls' command with cross-platform color support and convenient aliases. It uses OS detection and color support checks to determine the correct flags for macOS/BSD and Linux/GNU systems. Aliases like 'll', 'la', and 'l' are provided for different listing formats. ```zsh # Zsh aliases for ls alias ls='ls --color=auto' alias ll='ls -la' alias la='ls -la' alias l='ls -CF' ``` -------------------------------- ### Less Module: Enhanced Pager Features in Zsh Source: https://context7.com/egorlem/veil.zsh/llms.txt Illustrates the enhanced features of the 'less' pager when loaded via Veil.zsh, including automatic quitting for short files, case-insensitive search, preservation of raw control characters, and configurable tab width. ```bash # Enhanced less with smart options less file.txt # Features: # - Quit if content fits on one screen # - Case-insensitive search # - Raw control characters (colors preserved) # - Tab width: 4 spaces # Colorful man pages man grep # Displays with colored headings, bold, underline # Search pattern with highlighting lessSearch "function" script.sh # Opens script.sh with "function" highlighted # Real-time file monitoring (like tail -f) lessTail /var/log/syslog # Shows live updates as file grows # Terminal-specific optimization (automatic) # Kitty: optimized options for kitty terminal # Linux console: minimal safe options # Other: full feature set # Man page configuration # MANPAGER: less -s -M +Gg # MANWIDTH: 80 # LESS_TERMCAP_*: color codes for man pages # More alias points to less more file.txt # Executes: less file.txt ``` -------------------------------- ### Configure Zsh History Options Source: https://github.com/egorlem/veil.zsh/blob/main/components/modules/README.md Enhances Zsh command history with persistent storage, deduplication, and aliases for convenient access. These options ensure history is saved across sessions and avoids redundant entries. ```shell setopt EXTENDED_HISTORY setopt HIST_EXPIRE_DUPS_FIRST setopt HIST_IGNORE_DUPS setopt HIST_IGNORE_ALL_DUPS setopt HIST_FIND_NO_DUPS setopt HIST_IGNORE_SPACE setopt HIST_REDUCE_BLANKS setopt HIST_VERIFY setopt SHARE_HISTORY ``` -------------------------------- ### Manage Cursor Visibility with Veil.zsh Cursor Module Source: https://context7.com/egorlem/veil.zsh/llms.txt Enhances user experience by automatically hiding the cursor during screen clear operations and restoring it before the prompt appears. This prevents visual inconsistencies. ```bash # Load cursor module VEIL_MODULES="cursor" source ~/.veil/veil.zsh # Clear screen (cursor hidden during clear, restored at prompt) clear # Manual cursor check and restoration __ultimaCursorCheck __ultimaCursorRestore # Automatic behavior (no user action needed) # 1. Type 'clear' -> cursor hides # 2. Screen clears # 3. Prompt appears -> cursor restores ``` -------------------------------- ### Define Custom Aliases in Zsh (aliases.module.zsh) Source: https://github.com/egorlem/veil.zsh/blob/main/components/modules/README.md This Zsh module is a template for defining custom command aliases. It includes a commented-out structure where users can define their personal command shortcuts. The 'stay' alias is active by default, while others require uncommenting. ```zsh # Example alias definition: # alias ll='ls -la' # Bonus alias active by default: alias stay='cd -' ``` -------------------------------- ### Configure Zsh Navigation Options Source: https://github.com/egorlem/veil.zsh/blob/main/components/modules/README.md Sets Zsh options to modify directory navigation behavior, enabling automatic directory changes and managing the directory stack. These options influence how the shell handles directory traversal and stack operations. ```shell setopt AUTO_CD setopt AUTO_PUSHD setopt PUSHD_IGNORE_DUPS setopt PUSHD_SILENT ``` -------------------------------- ### Configure Environment Variables in Zsh (env.module.zsh) Source: https://github.com/egorlem/veil.zsh/blob/main/components/modules/README.md This Zsh module provides a structure for setting environment variables. It's designed as a clean slate, allowing users to uncomment and define their preferred variables like EDITOR, PAGER, and LANG. It relies on shell scripting for variable definition. ```zsh __veilEnvSetup() { # export EDITOR='vim' # export PAGER='less' # export LANG='en_US.UTF-8' # ... return 0 } ``` -------------------------------- ### Configure Less Pager in Zsh (less.module.zsh) Source: https://github.com/egorlem/veil.zsh/blob/main/components/modules/README.md This Zsh module optimizes the 'less' pager for viewing text files and man pages with terminal-specific enhancements. It sets environment variables like LESS and MANPAGER, aliases 'more' to 'less', and enables color and termcap support. It also provides utility functions like 'lessSearch' and 'lessTail'. ```zsh # Aliases for less and more alias less='less -R' alias more='less -R' # Example function for searching within less lessSearch() { less "$2" +/"$1" } # Example function for tailing a file with less lessTail() { less +F "$1" } ``` -------------------------------- ### Configure Zsh Keybindings for Editing and History Source: https://context7.com/egorlem/veil.zsh/llms.txt Customizes Zsh keybindings for enhanced line editing (deleting lines/words) and history navigation (up/down). These bindings are managed by the Keybindings Module of Veil.zsh. ```bash # Load keybindings module VEIL_MODULES="keybindings" source ~/.veil/veil.zsh # Edit module to add your keybindings # ~/.veil/components/modules/keybindings.module.zsh # Example configuration (uncomment to use) __veilKeybindingsSetup() { # Line editing bindkey '^U' backward-kill-line bindkey '^W' backward-kill-word bindkey '^K' kill-line # History navigation bindkey '^P' up-line-or-history bindkey '^N' down-line-or-history # Completion bindkey '^I' complete-word return 0 } # Reload and test source ~/.veil/veil.zsh # Press Ctrl+U to delete from cursor to line start # Press Ctrl+W to delete previous word ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.