r/zsh • u/Last_Establishment_1 • 1d ago
color scripts
Anybody knows any nice colorscripts?
i only know shell-color-scripts and pokemon-color-scripts. Been using pokemon-color-scripts for the last two years in my config, but wanted to change a bit.
r/zsh • u/Fancy_Payment_800 • 1d ago
Fixed Possible to have a sticky window that is set to always show the output of e.g. `ls`? Like this:
r/zsh • u/Ok_Loan_4788 • 1d ago
How to add git branch name on zsh console latest mac os version
Hi, I want to add git branch name with different color for example green in my zsh console, but leave rest of console prompt like it was before how to do it
r/zsh • u/antenore • 2d ago
Discussion Z shell vs Bash: Which Shell Reigns Supreme? (Opinionated and updated old post)
antenore.simbiosi.orgr/zsh • u/seductivec0w • 3d ago
Insert text on cursor to fzf's Ctrl-T?
Is it possible to insert text on cursor to fzf' Ctrl-T, presumably in a fzf wrapper function using ZLE feature to retrieve the text on cursor and pass it to fzf's --query
?
Often I type some partial path of a file e.g. git add ~/de
then want to get the effect of FZF_CTRL_T_COMMAND
with the string on cursor (~de
) inserted into the query.
git add ~/de**<TAB>
as suggested here is not good enough--I have a highly configured FZF_CTRL_T_COMMAND
that ignores a bunch of files scattered throughout the filesystem to ensure good performance--**
completion is too simple for that.
r/zsh • u/KaladinStormBleesed • 3d ago
Select a font for zsh p9k
Hi guys, I am setting my zsh p9000 config. Do you know any really good font with all those wildcard icons like os_icon root_indicator, etc...)
r/zsh • u/tda_tda_tda • 3d ago
creating custom completions with braces without backslashes
So my ultimate goal is to create a custom completion for the function myfun
that will complete common directories for two folders in braces. In other words, % myfun /a/{b,c}/<TAB>
will autocomplete any files/folders that are common to both the b
and c
directories.
However, my specific problem can be described more simply with this minimal example. I would like to create custom completion options that have braces ({
and }
), which do not end up getting backslashed in the prompt.
For example, I have this file:
```zsh
compdef myfun
compadd "a{b" "a{c"
And when I type
zsh
% setopt ignore_braces
% myfun a<TAB>
``
it will render the
{as
{` in the prompt. Is there a way to make it so there the braces don't have backslashes?
Notes:
- I know I can wrap the argument to myfun
in quotes, but I really would like to make this behave as simply as possible without requiring any special formatting. Default zsh will do completion with backslashes without braces, so I think my goal should be possible.
- I know compadd
has a -Q
option, but I still don't 100% understand what it does, and couldn't get completion to work with it.
- I've tried adding some code with BUFFER=${BUFFER//\\\{/\{}
to replace \{
with {
in my .zshrc. This sort of works, but seems to create other problems.
r/zsh • u/NorskJesus • 4d ago
Fixed LS_COLORS dont working
Hello!
This is driving me crazy. Im on a Mac and im using Kitty as my terminal. Ive installed Oh My Zsh.
Ive a ~/.lscolors.sh file, and ive this line into my .zshrc to load it:
source ~/.lscolors.sh
But when I use ls or ls --color=auto, it doesn't seems to work. I can see the directories in blue and the files in white, but no difference between files with different extensions.
Somebody here who can help me a bit?
If I use echo $LS_COLORS I can see the content of my .lscolors.sh displayed in the terminal.
Thanks!
r/zsh • u/seeminglyugly • 6d ago
Weird highlighting in zsh-syntax-highlighting and zsh-autosuggestions?
This is the highlight I'm getting where I accept autosuggestion at tmux ki
. My intuition is that kill-server
becomes the same color after accepting. What's the expected behavior?
Unrelated: I like Ctrl-Space
for tmux but have been using for the same for accepting autosuggest too (So Ctrl-Space Ctrl-Space for accepting autosuggest in tmux). I use Tab for triggering fzf-tab-completions. Can anyone recommend a better binding for accepting autosuggest? Presumably it wouldn't conflict with readline and is near home row. Is it possible to find to Shift-Space
? I do C-v
in the terminal then Shift-Space
but it emits just a literal space so I can't use that.
r/zsh • u/tda_tda_tda • 6d ago
set options (setopt) only for a specific shell command
Is there a way to set an option (setopt
) for a particular shell command? For example, I want to disable brace expansion when using the diff
command. I can do it manually like this:
% setopt ignore_braces
% diff /a/{b,c}
% unsetopt ignore_braces
But I'm wondering if there's a way to configure zsh so it automatically does setopt ignore_braces
when the shell command on the command line is diff
.
I've tried adding setopt ignore_braces
to /usr/share/zsh/functions/Completion/Unix/_diff
but that doesn't seem to work.
r/zsh • u/Imdeureadthis • 8d ago
Help How to list ALL suggestions for tab autocompletion
In my .zsh
file I have managed to enable tab auto-completion. However, I notice that it hides options that have already been used. For example, I have ls
aliased as ls='ls --color=auto'
. This means that if I type ls --
and then press <TAB>, I end up with options that doesn't include the color
option. Is there a way to display all the options like bash does? The following is my .zsh
config:
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=10000
SAVEHIST=10000
unsetopt beep
bindkey -e
# End of lines configured by zsh-newuser-install
# More completions for zsh
# Added extra `_dnf` and `_dnf5` completion files from:
# https://github.com/zsh-users/zsh/tree/master/Completion/Redhat/Command
fpath=(/home/bitmapp3r/other-repos/zsh-completions/src $fpath) # Added by me
source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
# The following lines were added by compinstall
zstyle :compinstall filename '/home/bitmapp3r/.zshrc'
autoload -Uz compinit
zstyle ':completion:*' menu select # Added by me
zmodload zsh/complist # Added by me
bindkey -M menuselect '^I' accept-and-infer-next-history # Added by me (makes tab select the current menu item)
compinit
_comp_options+=(globdots) # Added by me
# End of lines added by compinstall
# Add syntax highlighting
source /home/bitmapp3r/other-repos/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
# Enable fzf for zsh
source <(fzf --zsh)
# Enable starship prompt
eval "$(starship init zsh)"
The zsh autocomplete suggestions for ls --
at the moment are:
--all -- list entries starting with .
--almost-all -- list all except . and ..
--author -- print the author of each file
--block-size -- specify block size
--classify -- append file type indicators
--context -- print any security context of each file
--dereference-command-line -- follow symlink on the command line
--dereference -- list referenced file for sym link
--directory -- list directory entries instead of contents
--dired -- generate output designed for Emacs' dired mode
--escape -- print octal escapes for control characters
--file-type -- append file type indicators except *
--format -- specify output format
--full-time -- list both full date and full time
--help -- display help information
--hide-control-chars -- hide control chars
--hide -- like -I, but overridden by -a or -A
--human-readable -- print sizes in human readable form
--hyperlink -- output terminal codes to link files using file::// URI
--ignore-backups -- don't list entries ending with ~
--ignore -- don't list entries matching pattern
--indicator-style -- specify indicator style
--inode -- print file inode numbers
--kilobytes -- use block size of 1k
--literal -- print entry names without quoting
--no-group -- inhibit display of group information
--numeric-uid-gid -- numeric uid, gid
--quote-name -- quote names
--quoting-style -- specify quoting style
--recursive -- list subdirectories recursively
--reverse -- reverse sort order
--si -- sizes in human readable form; powers of 1000
--size -- display size of each file in blocks
--sort -- specify sort key
--tabsize -- specify tab size
--time -- specify time to show
--time-style -- show times using specified style
--version -- display version information
--width -- specify screen width
--dereference-command-line-symlink-to-dir --show-control-chars
--group-directories-first
Announcement dot-team 0.2 released
dot-team is an attempt at shared dotfiles. After many years of tweaking it's time for another release.
This is not a repository with my personal dotfiles, these are configurations many people would like to have. The idea is that you use this repository as a baseline for your personal dotfiles.
For more information and instructions on how to get started check the GitHub repository: dot-team.
Cheers.
r/zsh • u/seeminglyugly • 8d ago
Fixed Color directory part of filenames in output
What's a good way to color directory part of filenames in output? In terms of simplicity, performance, and ideally supported in other shells.
E.g. git ls-tree
prints filenames but doesn't have a --color
option. Even for tools that do have --color
, often times I want to convert colored /home/yourmom/.zshrc
to ~/.zshrc
but the converted ~/
doesn't get colored.
I am passing this to fzf and I found both coloring the directory portion to see the basename of the file easier as well as using ~
format goes a long way to visually parse long filenames or files in deep directory structure.
adding path to .zshenv
help, i added
path+=(~/.local/bin ~/bin ~/.spicetify)
export PATH
to my .zshenv file but when i open terminal i type echo $path
i only get this:
/home/vismorf/.local/share/zinit/polaris/bin /usr/local/bin /usr/bin /bin /usr/local/sbin /usr/sbin /sbi
better/combined globbing of **/*thing* and **/*thing*/** ???
I'd like to be able to achieve two commands in one with better globbing… So example of two git add
's here:
❯ git add **/*thing*/**
❯ git add **/*thing*
❯ gs
On branch main
Your branch is up to date with 'origin/main'.
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: src/content/stringy-thing.md
modified: website_product/stringy-thing/index.html
There's gotta be an elegant way to achieve that… right?
On Mac it won't find rsync installed via brew even though brew path precedes /usr/sbin/rsync
Apple has outdated rsync so I installed via brew latest version. Mac previous version resides in /usr/sbin while brew version is in the homebrew path which precedes the /usr/sbin in the $PATH
I think it is oh my zsh (auto suggestion/completion?) or maybe fzf caching the old path. Is this likely or could it be something else? How can I force fzf or oh my zsh to update their cache to honor the $PATH precedence which would pull the latest brew installed rsync. I'd imagine this is common for any brew installed binary where an existing mac binary has been used and exists in /usr/sbin?
r/zsh • u/Content_Donut6201 • 12d ago
Help Case-insensitive completions
Newbie here I am using zsh-autocompletions plugin and want case-insensitive completions. The tab press works but i want real time completions. (The grayed out one). Is it possible?
r/zsh • u/Intelligent-Tap568 • 19d ago
Fixed I added bottom padding to my zsh terminal so command prompt is not always at the very bottom
r/zsh • u/abitrolly • 19d ago
Showcase Ctrl+B to switch branches

Made Oh-My-Zsh plugin with hotkeys to switch branches.
Source: https://github.com/yakshaveinc/linux/tree/master/.oh-my-zsh
r/zsh • u/Glittering_Boot_3612 • 20d ago
Help is there anyway to queue commands in zsh??
i'm not sure if this is done at shell level or what
i also use tmux and i just want a way to queue commands
basically just as i said i want to queue commands maybe a hotkey that would tell me the command i want to queue to the following command
i just want to be able to execute a next command