Questions tagged [oh-my-zsh]

oh-my-zsh is an addon to zsh that adds additional functions, autocomplete helpers and themes.

Filter by
Sorted by
Tagged with
-1
votes
0answers
15 views

Zsh shell starts with error after install oh-my-zsh

After install Oh-My_Zsh from official site: https://ohmyz.sh/#install my local .zshrc is updated by installation script. When start a new zsh shell, I see error which complain two scripts: I install ...
1
vote
0answers
26 views

What are “zsh” commands for cut/copy/paste?

I want to configure zsh and bind its cutting, copying and pasting commands (or maybe they're called widgets idk) to different escape sequences, the ones that my terminal program sends across. Problem ...
0
votes
0answers
26 views

fc -RI in precmd, now up-line-or-history doesn't work

I'm using the option INC_APPEND_HISTORY_TIME. That doesn't work together with SHARE_HISTORY. So I thought I call fc -RI before each command. But now I can't access my history via up-line-or-history (...
0
votes
0answers
37 views

Multiple if condition in single brackets in zsh

The command bellow works well in bash: find . -depth -name Chart.yaml -exec sh -c 'f="{}"; if [[ ($f =~ ./api-*) && !($f =~ ./api-pnp-*) && !($f =~ ./api-edb-*) ]]; then ...
3
votes
2answers
25 views

How can I style the zsh completion section headers?

In my screenshot, the section headers ("recent branches", "local head", etc.) are visually indistinguishable from the completion suggestions. compinstall doesn't seem to be able to ...
4
votes
6answers
289 views

How to run windows executables from terminal without the explicitly specifying the .exe extension?

As the title says most of the question, how can we run windows executables without specifying the explicit .exe suffix at the end. For example reducing the call like explorer.exe . to explorer ., or ...
-1
votes
1answer
23 views

oh-my-zsh throws rrror when trying to access zsh profile in Mac OS Catalina

Trying to access either .zshrc or .zprofile doesn't work (it creates a new file). Trying to access the it with ~/.zshrc throws the same error. From my understanding I must have messed up one of my ...
2
votes
1answer
51 views

ZSH extends bash autocompletion

It's possible to make ZSH extends bash autocompletion? Bash can autocomplete almost every command in the system, and in ZSH i always need to enable a plugin for it. Here is an example (ignore the ...
0
votes
1answer
33 views

Customizing hostname in zsh prompt

I am using zsh with oh my zsh and I wanted to get a thing like this: How can I do it? I want a setting to put somewhere, so that whenever I restart my terminal and my system, it always displays the ...
1
vote
0answers
45 views

Why I can not get Terminator to use the default defined shell?

I am using ZSH as my default shell and OhMyZsh as well as the following command shows: ❯ echo $SHELL /bin/zsh I have been following what it is found at https://askubuntu.com/a/253819 but with no luck ...
1
vote
1answer
46 views

Lost my Aliases after installing Oh my Zsh

I had several Aliases defined on my terminal Zsh (Mac OSx), after installing Oh My Zsh I cannot execute my old aliases, and by running the alias I see a list of many new aliases added by Oh My Zsh. ...
0
votes
0answers
34 views

Backspace deletes a whole word zsh

I'm currently having a minor issue with zsh, as since the last update, pressing backspace deletes a whole word, which is quite inconvenient. I looked for a solution, thought it may come from a sneaky ...
2
votes
1answer
126 views

How can I use hist_ignore_dups to ignore duplicate lines in zsh with extended_history enabled?

When enabling hist_ignore_dups in zsh, I find there are many duplicate lines in $HISTFILE. (Note: HISTFILE="$HOME/.zsh_history") $ cat $HISTFILE : 1593874281:0;ls : 1593874287:0;l : ...
0
votes
1answer
1k views

Customize Shell Prompt Oh-my-zsh

Consider the following screenshot I'm using oh-my-zsh for shell customization. But due to the longer paths , I am unable to write longer linux commands. I want to change the prompt that only showing ...
0
votes
1answer
29 views

Zsh cannot be customized

I have trouble trying to customize my z shell with OMZ framework and some other plugins. I am in my zsh, but when I tried to echo $ZSH_THEME, nothing appears. I am suspecting that the problem has to ...
0
votes
2answers
557 views

terminal stuck at “login” - blank screen (after installing oh-my-zsh, I think)

(I originally posted this on apple.stackexchange but then I found this one which is probably a better place) I have a big problem. I've freshly installed mac os and was setting up my terminal. I ...
1
vote
2answers
82 views

How can I configure ZSH to start each shell with an isolated, empty history?

I use ZSH with Oh My Zsh. I would like each new ZSH shell to start with an empty history. Commands typed in one shell should never show up in the history of another shell. How can I achieve this? I'...
3
votes
2answers
669 views

How to get asterisk '*' in zsh to have same behaviour as bash?

I have recently switched from bash to zsh and now when I type ls * It does not simply list all files in this directory, but shows a tree of two levels. Also rm -rf somepath/* fails with the ...
1
vote
1answer
200 views

zsh prompt isn't showing the arrow key due to font issues

I am having oh-my-zsh installed but the prompt is not showing the proper arrow which I Was expecting . I setup the arch linux from very scratch but I think I am missing those fonts. I am not sure ...
-1
votes
1answer
42 views

ZSH history moves by two

I use oh-my-zsh for some zsh configuration, but I have a stock installation with only git and asdf plugins. This started happening a couple of days ago, and I don't know of anything in particular ...
0
votes
0answers
27 views

Stderr sometimes gets redirected to /dev/null [duplicate]

Sometimes when i am working in a shell i suddenly find out that standard error has been linked to /dev/null. If i open a new shell it is back to normal. I am using zsh with oh-my-zsh and prezto. I ...
0
votes
0answers
39 views

Is there a way to run powerline in sudo

I'm trying to install powerline on archlinux. It works well when I use vim on my user mode. But, when I tried to edit some file that required sudo, it isn't working. I got the message like this after ...
5
votes
1answer
90 views

How to manually add the commands to autosuggestion plugin of zsh?

zsh has a great feature of autosuggestion (through a plugin) which remembers as one type in the terminal and then helps out during next instance of typing the same command. I have around 1000 lines ...
-1
votes
1answer
105 views

ZSH Path Autocompletion Highlight

In ZSH, when I'm trying to cd into a directory and use tab to get the list of directories, some of them have this very bright green highlight. I noticed that the background highlight is the same as ...
0
votes
0answers
29 views

How to disambiguate when grabbing filename by the middle and there are several matches? [duplicate]

In zsh with oh-my-zsh, I like how I can, within this directory for instance: mydir/ app.component.html app.component.ts app.module.ts app-routing.module.ts type ./html<tab> and have it ...
0
votes
1answer
32 views

How to prevent “Clear scrollback & reset” from breaking ZSH history in Konsole?

When I do the "Clear scrollback & reset" command in Konsole, while using ZSH (with Oh-My-Zsh), the latter loses ability to search backward in history using up arrow key. I.e. when I print a ...
0
votes
1answer
747 views

Multi-user env, SSH ZSH - command not found: shopt

I just installed ZSH on a remote server where we are 2 "admins". I switched my default shell to ZSH with chsh -s $(which zsh). echo $SHELL gives the output /usr/bin/zsh which proves it. But, when I ...
5
votes
2answers
803 views

Why do I lose my ZSH history?

Every once in a while I discover my zsh history has been truncated (or maybe lost entirely, difficult to tell), and I have to restore it from backup. For example, today: ls -lh ~/.zsh_history -rw----...
0
votes
2answers
554 views

How to move all files in a folder to a sub folder in zsh w/ Mac OS X?

This question is basically a duplicate of this: https://askubuntu.com/questions/91740/how-to-move-all-files-in-current-folder-to-subfolder But instead I'm asking how to do it in the Mac OS X terminal ...
0
votes
1answer
64 views

Having sudo and non-sudo parts in an alias - why does it not work with >>?

I was trying to use an alias which should run two commands, where the first is fine to be run with normal user privileges and the second one needs sudo privileges. alias hosts-get="scp user@host.com:...
5
votes
1answer
3k views

oh-my-zsh's prompt is slow: how to fix this

I'm using macOS 10.15.2 with iTerm2, zsh 5.7.1 and oh-my-zsh (theme robbyrussell). I noticed that the prompt print is slightly slow respect to the bash one. For example, if I press enter, cursor ...
1
vote
1answer
71 views

zsh - run gpustat command after login

I am trying to execute the gpustat command after SSHing into a remote server. I am using z-shell + oh-my-zsh. I put the gpustat command into my .zshrc file. However, after logging in, I get the ...
0
votes
1answer
73 views

How to tell zsh to directly enter the auto-completion list?

When I am using zsh (default installation of oh-my-zsh) and press Tab it auto-completes the path which is very useful. If there is only one candidate the auto-completion system just add the candidate ...
2
votes
1answer
198 views

Ignore history when using zsh

I set the HISTORY_IGNORE variable in ~/.zshrc and it correctly prevents those commands from being written to ~/.zsh_history. But what I really want is for those entries not to show when pressing up ...
2
votes
1answer
111 views

Zsh: complete the files in current directory no matter what command is

For example, when I just want to make cfiles without makefile: $ make a<tab> a1.c a2.c a3.c ... but seems that zsh would detect the command then completes nothing when I hit tab. It works ...
1
vote
0answers
31 views

Oh My Zsh - execute ls after auto cd [duplicate]

Oh My Zsh has this lovely feature where you can just type dir-name instead of cd dir-name to access the directory called dir-name. In my old .bashrc I had a function that overwrites the builtin cd ...
0
votes
0answers
158 views

How can I delete whole word when using oh-my-zsh

When I use standard zsh ctrl+w deletes whole word (i.e. it would remove whole foo-bar). However, when using oh-my-zsh I would delete only last part of the word and leave foo-. I want to be able to use ...
3
votes
1answer
82 views

Does zsh have some kind of diagnostic mode?

I am experience some problem in my zsh configuration which is based on oh-my-zsh, which I have described at Physical buffer in terminal is getting misaligned with display in oh-my-zsh configuration. ...
0
votes
0answers
88 views

Physical buffer in terminal is getting misaligned with display in oh-my-zsh configuration

I have been experiencing an unusual problem in the oh-my-zsh configuration in which the cursor gets out of sync with the text. (I normally work using screen in konsole. For instance on a new terminal ...
2
votes
2answers
4k views

Pip error after changing from bash to zsh

So I recently changed from the bash shell to zsh. However, I have some trouble when working with python specifically pip. When I try pip list ModuleNotFoundError: No module named 'pip._internal.main'...
3
votes
2answers
336 views

Invoking external editor from Vi command line editing mode in zsh

For some reason, I can't get the keybinding to invoke Vim (my editor) to work with Esc+v zsh when using iTerm. I've gone back to a minimalist .zshrc file, to ensure it's not a plugin issue: # If ...
0
votes
1answer
1k views

How does one have custom LS_COLOR work for ZSH? [duplicate]

I wanted to make custom colors for the ls command with zsh, but I find that all the previous answers to this do not work for me. I tried all these options: Option 1) #LS_COLORS='no=00;37:fi=00:di=...
1
vote
1answer
37 views

Zsh completion script found but not executed

First, let's assume that I have: alias foo='path/to/my/program' in my .zshrc, then I created a completion script ~/.oh-my-zsh/completions/_foo for it, where inside the file I have: #compdef foo ...
0
votes
1answer
61 views

How can I get colors to work in tldr plugin?

There's a plug-in (I believe this to be the right term) which is called 'tldr'. On the tldr page, you can see this screenshot: While I do have some color plug-ins installed (such as colorls and some ...
0
votes
1answer
276 views

How to install Google Cloud completion in NixOS with Oh-My-Zsh?

Oh-my-zsh has a plugin option (plugins = (gcloud, ...)) which allows installing gcloud completions. When I add "gcloud" to plugins, I expect that the completion will be sourced during shell ...
0
votes
1answer
912 views

Why does “alias python=/usr/local/bin/python3.7” keep getting appended to my .zshrc every time I open up a homebrew managed version of Anaconda?

I run a fairly stock .zshrc configuration. Stock meaning only a couple of aliases and a theme. But every time I open my .zshrc, I see several appended lines that all say this: "alias python=/usr/...
3
votes
1answer
2k views

How to properly make custom zsh completions “just work”?

Please forgive me if I'm doing something stupid here, the documentation is huge and searching didn't turn up anything yet. I'm trying to create shell completions for my custom script called fab. For ...
1
vote
0answers
16 views

Why Zsh `time` not work for some commands? [duplicate]

Why Zsh time not work for some commands, ➜ ~ type time time is a reserved word ➜ ~ time sleep 1 sleep 1 0.00s user 0.00s system 0% cpu 1.004 total # not work for echo ➜ ~ time echo hello hello # ...
6
votes
1answer
1k views

Auto trigger history search in terminal using fzf (fuzzy finder)

Is it possible to trigger fzf history search automatically in zsh shell? In this video, the user clicks "Ctrl+r" to start the history search and then starts typing. Is it possible to start the ...
1
vote
1answer
187 views

Unwanted trailing white-spaces comes along on copy-paste

I'm using Tmux & Zsh (WSL) and am very frustrated with all the white-spaces that comes with when copy content from a file while using nano. nano .zshrc . When using Shift+Right Mouse Button or ...

1
2 3 4 5