English | 中文
./
├── cache/
├── config/
│ ├── aliases.zsh
│ ├── env.zsh
│ ├── fzf.zsh
│ ├── git.zsh
│ └── hook.zsh
├── lib/
│ ├── file_preview.sh
│ ├── get_cursor.sh
│ ├── img_preview.sh
│ └── init.sh
├── plugins/
│ ├── extract/
│ ├── fzf-tab/
│ ├── randport/
│ ├── z.lua/
│ ├── zsh-autosuggestions/
│ └── zsh-syntax-highlighting/
├── scripts/
│ └── install_zsh_config.sh
├── themes/
│ └── simple.zsh-theme
└── omz.zsh
Theoretically supports most distributions; please test it yourself. Make sure to back up before running!
curl -fsSL https://raw.githubusercontent.com/SinclairLin/omz/main/scripts/install_zsh_config.sh | bashNote: The automatic installation script prioritizes the system package manager. Some dependency versions on Debian stable/oldstable might be outdated. It is recommended to manually check versions after installation and upgrade key dependencies individually if necessary.
Quick check:
fzf --version
fd --version || fdfind --versionZsh,lua,fdin Arch Linux:
sudo pacman -S zsh lua fdin Debian:
sudo apt install zsh lua5.4 fd-find
command -v fd >/dev/null 2>&1 || sudo ln -s /usr/bin/fdfind /usr/local/bin/fdin OpenWrt:
opkg install zsh
sed -i 's|:/bin/ash|:/usr/bin/zsh|g' /etc/passwd # Change default shell
wget https://github.com/sharkdp/fd/releases/download/v10.3.0/fd-v10.3.0-aarch64-unknown-linux-musl.tar.gz
tar -zxvf fd-v10.3.0-aarch64-unknown-linux-musl.tar.gz
mv fd-v10.3.0-aarch64-unknown-linux-musl/fd /usr/bin
chmod +x /usr/bin/fd
fd --version- fzf
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/installClone my configuration to ~/.config:
git clone https://github.com/SinclairLin/omz ~/.config/zsh && echo 'source ~/.config/zsh/omz.zsh' >> ~/.zshrcDefines an
extractfunction; simply executeextract <filename>orx <filename>to decompress an archive file. This way, you don't need to know the specific command for decompressing files. The function will create a new folder and extract the files into it. For specific files that can be decompressed: SinclairLin/zsh-extract.
Defines a
randportfunction that randomly selects an available port between 49152 and 65535 and prints it to the screen.
Using
z <dir>will jump to the path with the highest "Frecent" (Frequency + Recency) value among all paths.
EXAMPLES:
z foo # Jump to the path containing foo with the highest weight (Frecent)
z foo bar # Jump to the path containing both foo and bar with the highest weight
z -r foo # Jump to the path containing foo with the highest access count
z -t foo # Jump to the path containing foo that was accessed most recently
z -l foo # Do not jump, just list all paths matching foo
z -c foo # Jump to the path containing foo that is a subdirectory of the current path with the highest weight
z -e foo # Do not jump, just print the path matching foo with the highest weight
z -i foo # Enter interactive selection mode to let you choose where to go (if there are multiple results)
z -I foo # Enter interactive selection mode, but use fzf for selection
z -b foo # Jump to the parent directory level starting with fooSuggests commands as you type based on history and completions. Use the
<right>key to accept the current suggestion, and<^ right>to accept only one word.
Enables syntax highlighting in
Zshsimilar toFish shell.
Replaces
Zsh's default completion selection menu with fzf.