The aim of this project is to provide a sensible default (system-wide) Zsh configuration that will meet the basic needs and expectations of most users. In other words, make Zsh easy to use right out of the box, without having to configure it, while not getting in the way of individual user customization.
-
XDG-based locations for Zsh data and cache files. 10-base-dirs.zsh
-
Some basic aliases that most people expect. 50-aliases.zsh
-
Command not found handler for apk-tools. 50-command-not-found.zsh
-
Reasonable history defaults. 50-history.zsh
-
Global key bindings consistent with
/etc/inputrc
(and thus with ash, bash and any other program using readline). 50-key-bindings.zsh -
Miscellaneous useful options. 50-misc.zsh
-
Support for OSC 133 Semantic Prompt [1]. 50-semantic-prompt.zsh
-
Integration with the system clipboard – copies the kill (cut) buffer to the system clipboard on each change (e.g. on Ctrl+Insert, Ctrl+W, …). 70-clipboard.zsh
-
Initialization of the completion system with reasonable defaults and caching. 70-completion.zsh
Tip
|
If you as a user want to disable some of these features, define variable zshrc_blacklist with an array of the script names (without .zsh suffix) in your $ZDOTDIR/.zshenv [2], for example: zshrc_blacklist=(50-command-not-found 70-completion) .
|
List of key bindings defined in the emacs
, viins
, and vicmd
keymaps.
-
Home – move cursor to the beginning of a line
-
End – move cursor to the end of a line
-
Delete – delete the next character
-
Page Up – move cursor up a line, or if already at the top line, move to the previous event in the history
-
Page Down – move cursor down a line, or if already at the bottom line, move to the next event in the history
-
Up Arrow – move cursor up a line, or if already at the top line, fuzzy search backward in the history for a line beginning with a whole line prefix up to the cursor position
-
Down Arrow – move cursor down a line, or if already at the bottom line, fuzzy search forward in the history for a line beginning with a whole line prefix up to the cursor position
-
Shift+Tab – perform menu completion, or if a menu completion is already in progress, move to the previous completion
-
Ctrl+Insert – copy the area from cursor to the mark to the kill buffer and clipboard (if available)
-
Ctrl+Delete – delete (and copy) the next word
-
Ctrl+Left Arrow – move cursor to the beginning of the previous word
-
Ctrl+Right Arrow – move cursor to the beginning of the next word
Users can define the following configuration variables in their `$ZDOTDIR/.zshenv`[2] to override the default settings.
Variable Name | Default Value | Description |
---|---|---|
ZSH_CACHE_DIR |
|
Path to a directory where to store cache files (e.g. completion cache). If it doesn’t exist, it will be created. |
ZSH_DATA_DIR |
|
Path to a directory where to store persistent data files (e.g. Zsh history). If it doesn’t exist, it will be created. |
ZSH_COMPDUMP |
|
Path to the Zsh completion dump file. |
HISTFILE |
|
Path to the Zsh history file. If |
ZSH_CUTBUFFER_CLIPBOARD |
|
The system clipboard to synchronize the kill (cut) buffer with; either |
osc52_supported_terms |
|
An array of |
-
zsh >=5.8.1-r1
-
wl-clipboard, xclip or tty-copy for integration with the system clipboard (optional)
Install package alpine-zsh-config on Alpine Linux Edge, v3.16 or later:
apk add alpine-zsh-config
This project is licensed under MIT License. For the full text of the license, see the LICENSE file.