Questions tagged [oh-my-zsh]
oh-my-zsh is an addon to zsh that adds additional functions, autocomplete helpers and themes
184
questions
1
vote
0
answers
18
views
Why does zsh navigation behave differently in the VS Code terminal vs macOS terminal?
When I am using zsh in the inbuilt VS Code terminal, I can:
a) use the up and down arrow keys to navigate through my command history when typing a command:
zsh command navigation
b) use all arrow keys ...
0
votes
0
answers
70
views
Tab completion not working in zsh with custom script to change iTerm profile
I am basically following this (rather dated) gist by Hector Leiva because I want my iTerm color scheme to change when I ssh to specific hosts.
I am using ZSH and oh-my-zsh.
Everything is working (i.e. ...
0
votes
0
answers
89
views
~/.oh-my-zsh/oh-my-zsh.sh:17: parse error near `done'
I am keeping to have this error:
~/.oh-my-zsh/oh-my-zsh.sh:17: parse error near `done'
when I source ~/.zshrc...
This is the file ~/.oh-my-zsh/oh-my-zsh.sh
# ANSI formatting function (\033[<code&...
0
votes
0
answers
57
views
Configure zsh syntax highlighting for bash-my-aws
I have been using zsh syntax highlighter from this repo and it has been very great so far. Now, I discovered a repo called bash-my-aws which aliases my awscli commands to a more usable and compact ...
1
vote
1
answer
91
views
iTerm 2 ZSH font all one color
Related to
iTerm 2 ZSH colors/themes not showed correctly
Machine: macOS Ventura 13.3
My iTerm2 wont use any other colors than all white (and all black in vim) for my fonts. Can anyone see what I'm ...
0
votes
1
answer
174
views
How can I prevent iTerm2 from printing environment information on startup?
I recently started using iTerm2 + Oh My Zsh to see what the hype was all about. While it's cool, I had some issues getting it to work properly. Specifically, it wasn't recognizing standard commands ...
0
votes
0
answers
92
views
Auto apply backslash to pasted text in iTerm2, that contains '?' (indicator to the start of query string in URL)
Previously, I could paste a website URL (Ex. https://www.youtube.com/watch?v=VIDEO_ID) after copying from the browser URL section, onto iTerm2 window.
It would escape the question mark and equal sign, ...
0
votes
0
answers
60
views
How to disable suggest directories zsh
zsh automatically suggests directories in the current working directory.
How to disable it?
3
votes
0
answers
140
views
Not able to set lang to CN in zsh macOS, but locale is good. The word “total” is still shown in English
~/.zshrc:
export LANG="zh_CN.UTF-8"
export LANGUAGE="zh_CN.UTF-8"
export LC_COLLATE="zh_CN.UTF-8"
export LC_CTYPE="zh_CN.UTF-8"
export LC_MESSAGES="zh_CN....
3
votes
1
answer
1k
views
How to activate ZLE (ZSH Line Editor)
How do I activate ZLE, the ZSH line editor?
I am trying to enable the local history in ZSH. I've added zle set-local-history 1 to my ~/.zshrc, but it prints the error: widgets can only be called when ...
0
votes
1
answer
2k
views
Oh My ZSH - Show home path instead of tilde
My terminal now shows
name@host:~/path/to/some/file
I want to change ~ to /users/name/path/to/some/file
The .zshrc file doesn't have PS1 and even though I tried adding one with $PWD (setting PS1 to \u@...
1
vote
1
answer
2k
views
What files do I need to move for zsh + oh-my-zsh if I migrate to a new machine?
New machine and I went looking for instructions for this and didn't find any. I'm sure I need to move over my .zprofile and .zshrc, anything else? I have the old machine still.
Bonus: also using oh-my-...
0
votes
1
answer
290
views
ZSH Terminal: Can't find tmux.cnf file
I've installed Tmux in my Arch Linux GNOME system and for changing keybinds. I need to configure .tmux.cnf, but I can't find it. I searched for ~/.tmux.cnf, /etc/tmux.cnf or /etc/.tmux.cnf and seeing ...
0
votes
0
answers
561
views
How to add/modify env variable in oh-my-zsh
I am using macbook(m1) chip with oh-my-zsh.
How / where can I add a new env variable. For example before using oh-my-zsh, I used to add the following lines in ~./zshrc and source the file/open a new ...
3
votes
0
answers
957
views
Tips on how to speed up ZSH shell start up time
can someone help me understand why my Zsh start up is so slow. My Zsh takes up to six 6 seconds to start up so I added zmodload zsh/zprof and zprof to my .zshrc to see what takes the most time. The ...
0
votes
1
answer
498
views
powerlevel10k slanted theme not aligned in VSCode integrated terminal
I have powerlevel10k installed on my zsh.
On VSCode integrated terminal, the slanted theme is not aligned properly, even with MesloLGS NF font installed and terminal.integrated.fontfamily set to ...
0
votes
1
answer
37
views
My migrated zsh terminal looks werid
I migrated my zsh setup to another machine, but it looks weird, instead of regular "UI" look I see weird symbols
✔ 13s name@damain 16:30:23
what might be the problem?
0
votes
0
answers
73
views
How to get oh my zsh in Amazon2 wsl terminal in vscode?
I should preface this with I am a longtime macOS user so I am sorry in advance if I ask a dumb question here.
My team at work uses Amazon workspace and there is a version of wsl we use for our ...
0
votes
0
answers
615
views
How to launch VScode in a particular Conda environment on a Mac
I have Jupyter v2022.9.1202862440, Jupyter keymaps v1.0.0, Jupyter Notebook Renderer v1.0.10, Jupyter Slideshow v0.1.5, Extensions installed in VScode and am trying to run a .ipynb code block directly ...
1
vote
1
answer
710
views
How do HISTSIZE and HISTFILESIZE affects zsh directory history
I'm using zsh per-directory-history plugin https://github.com/tymm/zsh-directory-history
I'm not clear that whether the history is limited by HISTSIZE or HISTFILESIZE
I do find some usage of HISTSIZE ...
0
votes
0
answers
28
views
some extra directories in macOS PATH variable
I can't figure out where some extra directories come from in my PATH variable
As a shell I am using oh-my-zsh. In the .zshrc there are the following lines:
export PATH="$PATH:$HOME/Documents/...
0
votes
1
answer
1k
views
Unable to install Oh-my-posh
I have been following the tutorial in https://ohmyposh.dev/docs/installation/windows so I can get my nice Oh-My-Posh as I've always had. They seem to have changed from installing a module to a ...
2
votes
1
answer
978
views
How to bindkey alt+delete to kill word forward in zsh?
I want to bindkey alt+delete to kill word forward in zsh. Also, I use ohmyzsh for configuration, and I have found that use "bindkey ^U backward-kill-line" to kill line backward like bash. I ...
1
vote
1
answer
401
views
special characters not rendering well in zsh
I'm running rxvt-unicode, with zsh + ohmyzsh.
I just installed firacode, verified font name with fc-cache and set URxvt*font: xft:FiraCode in ~/.Xresources, and ran xrdb ~/.Xresources.
Then I ...
1
vote
1
answer
496
views
ZSH Colorize the PWD output in aliases
NOTE: Yes, This is on Mac OS 11.6.2 Big Sur.
Right now I have zsh aliases in the .zshrc file to make terminal navigation easier. I thought I'd try to colorize the PWD output, but what happens is that ...
0
votes
0
answers
66
views
Weird characters in linux Konsole
I´m running linux Konsole on top of Cinnamon graphical environment under zsh shell.
Here is the shot
The .zshrc contains the following call:
autoload -U promptinit && promptinit
prompt fade
...
0
votes
1
answer
601
views
How to refresh terminal after function call
I've written a simple function to search the current folder when I press ctrl+f with exa and peco, after I choose a directory I want to cd into it.
(ll is modified version of ls)
pecofunc() {
ll | ...
14
votes
2
answers
6k
views
zsh: keep all command outputs on terminal screen
I'd like to know how can I get zsh to behave like bash regarding this:
I want command outputs to always show up right below these commands in terminal.
For example, when I run the following command ...
1
vote
1
answer
1k
views
Antigen failing to load theme from .zshrc
I have a fresh Debin Bullseye installation and I can't get antigen to load a theme if loading it directly in .zshrc.
I installed zsh and zsh-antigen using apt.
My minimal .zshrc:
source /usr/share/zsh-...
2
votes
4
answers
3k
views
Zsh only shows directory for current command?
I have my terminal set up to show the directory path:
However it only does this for the current command. Once I run another command the previous directory path isnt shown:
I find this quite jarring ...
0
votes
3
answers
3k
views
Pass autocomplete only works directly after installing oh-my-zsh
TLDR: Auto-complete only works directly after installing oh-my-zsh. If I close and re-open the terminal, auto-complete no longer works.
I'm running MacOS BigSur M1. I'm using the Unix Pass manager, ...
0
votes
1
answer
2k
views
Zsh on startup doesn't load
I'm having some issues with my terminal loading. I am using zsh + oh-my-zsh and seem to be having 2 seperate issues with them.
The oh-my-zsh.sh file seems to take 43 seconds to load, which in turn ...
0
votes
1
answer
768
views
zsh fails to interpret a piped command which is OK with bash
~ ᐅ docker image inspect nginx | jq .[].Config.ExposedPorts
zsh: no matches found: .[].Config.ExposedPorts
With bash it works as expected.
I found out a difference as to how the piping is interpreted ...
2
votes
1
answer
1k
views
zsh + oh-my-zsh functions in function folder not found
my $ZSH is set to /home/goldy/.oh-my-zsh
I have this file
# $ZSH/functions/run_after_save
function run_after_save {
# my logic here
}
and my fpath does include the functions folder:
$ echo $fpath
# ...
0
votes
1
answer
6k
views
Add function to ~/.zshrc
I'm trying to apply the following : https://stackoverflow.com/questions/58549853/compiling-header-files-for-c-using-vscode-code-runner
But I'm stuck/missdo on the part to copy and paste the function ...
0
votes
1
answer
5k
views
ZSH Plugins are not working on Mac in iTerm2
So I have installed ZSH using:
brew install zsh
and then I have installed oh my zsh:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
then I ...
0
votes
2
answers
507
views
find argument issues while on zsh
I have this strange issue executing the following command on zsh using powerlevel10k. Honestly I have no clue what could be causing it, however, I removed all oh-my-zsh plugins just to try without ...
2
votes
2
answers
6k
views
"No such file or directory: ~/.oh-my-zsh/oh-my-zsh.sh" even though file exists
I was trying to transfer my terminal setup (iTerm2, zsh, oh-my-zsh, omz themes) from an old MacBook to a new one.
.zshrc real file is in Dropbox shared between the two laptops, and in each laptop ...
2
votes
1
answer
263
views
ZSH prompt: path except current dir
Can zsh set the prompt to the whole path except the current dir? I.e. for ~/a/b/c/ to just ~/a/b/?
I'm trying to get this result for ~/a/b/c with left & right prompts:
c/: | ~/a/b/...
3
votes
1
answer
7k
views
PowerLevel10K prompt not getting correctly formatted in tmux
I am using oh-my-zsh shell and powerlevel10k theme on my system. I recently installed tmux. But for some reason the prompt of tmux is not getting correctly formatted.
Here is my .tmux.conf file:
set -...
4
votes
3
answers
2k
views
Tab completion in zsh makes duplicate characters
when using tab completion in zsh, using ohmyzsh, in a relatively fresh arch install, the first two characters will duplicate themselves and become not deletable.
For instance, I type yay -S terminato ,...
3
votes
2
answers
8k
views
Up arrow key for history not working in zsh and iTerm (MacOS)
For the last few weeks I've been unable to use the up and down arrow keys to navigate my command history in zsh.
I'm using the following:
Intel MacBook Pro with macOS Big Sur 11.0.1 (20B29)
zsh 5.8 (...
1
vote
2
answers
872
views
How to save command history in all shell
I am using Zsh with 'oh-my-zsh' with iTerm2 on macoxs.
I find that when I execute 'history', it only list the command of my current tab.
How can I save the history
among all the tabs in iTerm
even ...
3
votes
3
answers
1k
views
How to setup zsh to append history to a file named dynamically by date
My biggest sticking point moving from bash to zsh is the history configuration. Using oh-my-zsh there is a history.zsh file in #ZSH/lib that I found (I think) can be disabled via unsetopt ...
0
votes
0
answers
448
views
How can I customize the virtualenv info in zsh theme?
I use the bureau theme (little customized) with oh-my-zsh.
.zshrc file
zsh-theme file
p0tt3r@wand ~ [21:19:10] ()
>🔮$ ...
1
vote
1
answer
1k
views
How do you bind double tap key in Oh My Zsh?
I'm trying to bind double tab to "autosuggest-accept" from the auto suggest plugin:
https://github.com/zsh-users/zsh-autosuggestions
Having to press right arrow to accept suggestion is a bit ...
0
votes
1
answer
431
views
How do I get single-Enter execution with Oh My Zsh when using event designators? [duplicate]
In plain zsh, when I press Enter, it runs the command I've typed. Hooray! This includes performing any necessary event designator substitutions all in one go, though it prints them out along the way:
~...
2
votes
1
answer
1k
views
ZSH prints the command I ran before showing the output
I'm using OhMyZsh with the PowerLevel9K theme and ZSH always prints the command I ran first (just the command without the arguments) before actually showing the output:
$ ls
ls<dir1> <dir2>...
1
vote
1
answer
288
views
tmuxinator unknown command: C-m
I want to write a single script to tunnel multiple ip and port to my local ports using tsh. I came across tmux and tmuxinator to do the job.
I have written a tmuxinator project as
# ./.tmuxinator.yml
...
2
votes
1
answer
123
views
ZSH evaluate history within a function?
I'm trying to get my shell to be extra fancy, and what I'd like is for certain pieces of the prompt to disappear if commands haven't been used in the past X commands. So for instance, I'd like to have ...