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
0 votes
2 answers
81 views

Listing filenames with special characters

I have a zsh shell (with oh-my-zsh default config). Why I ls filenames with special characters, they are printed as: ''$'\316\262''=0.35-L=32-m=10.jld2' This should be: β=0.35-L=32-m=10.jld2 but the ...
a06e's user avatar
  • 1,667
0 votes
0 answers
19 views

When is it more appropriate to use zsh options vs keybind?

Context: I was researching how to make my tab key perform menu completion in zsh. During my search, I found there's two ways (perhaps more) to get this behavior: options and/or keybind. Is choosing ...
Daniel Kaplan's user avatar
0 votes
0 answers
5 views

In oh-my-zsh, how do I get the bindkey keymap string for the key combination I'm pressing? [duplicate]

I'm trying to make the up and down keys go back and forward in command line history, respectively. While googling how to do this, I saw a lot of commenters giving their opinions on certain keymap ...
Daniel Kaplan's user avatar
0 votes
1 answer
74 views

Using grep with ps and column width specification

I'm trying to limit the column width of the command column when running a ps command, but also trying to pipe that output into a grep command. However, this is not working. This runs fine: ps -eo pid,...
risingTide's user avatar
0 votes
1 answer
39 views

Double zsh prompt is showing unformatted then formatted

Any command I run (aside from clear) results in a double zsh prompt -- the first one showing the unformatted prompt, the second one showing the correct, formatted prompt. My ~/.zshrc file: if [[ -r &...
joon_bug's user avatar
0 votes
2 answers
88 views

Clear shell history on shutdown/logout

I want to clear my shell history on every shutdown/logout. I know how to clear the history manually, I know how to clear the history automatically, when closing the session/terminal emulator. However, ...
grbll's user avatar
  • 23
0 votes
1 answer
30 views

Getting: _start_agent:18: no such file or directory: /root/.ssh/environment

Whenever I log into a box, I'm getting _start_agent:18: no such file or directory: /root/.ssh/environment-8c5f0414d6b3 chmod: /root/.ssh/environment-8c5f0414d6b3: No such file or directory ...
Evan Carroll's user avatar
0 votes
1 answer
39 views

Getting: _start_agent:18: command not found: ssh-agent

Whenever I log into a box, I'm getting _start_agent:18: command not found: ssh-agent How can I resolve this problem?
Evan Carroll's user avatar
0 votes
1 answer
45 views

Experiencing glitches on terminal Fedora 38

I recently switched from bash to zsh in Fedora 38. I have installed oh my zsh and have the following plugins. plugins=(git fzf tig zsh-autosuggestions) My terminal has been acting really weird. Part ...
comper's user avatar
  • 3
3 votes
0 answers
65 views

Most recents files/directory suggested results by TAB completion with zsh

I would like to get with TAB suggestion on zsh to get the more recent file as first suggestion after a second TAB pushing. For the moment, I have with a first TAB pushing the list of the more recent ...
guizmo133's user avatar
2 votes
1 answer
177 views

Oh my zsh is only working when i log in as root

Recently installed zsh and oh my zsh but when i open a terminal nothing changes, the bar keeps looking as always but it changes only when i log as root doing sudo su, I have tried almost everyting but ...
Unlucko's user avatar
  • 23
2 votes
1 answer
62 views

zsh gnu-screen tab completion for `-x` flag similar to `-ls`

In bash, when I type screen -x and press tab twice, I get a list of all the running sessions. In zsh, when I type screen -ls and press tab twice, I get a list of all the running sessions and can tab ...
Daniel F's user avatar
  • 827
0 votes
1 answer
28 views

Command line "delete last word" misbehaving

In my zsh environment, when I try to delete last word on command line using either Ctrl + W or Opt + Delete, it is always misbehaving, eg # start with this line below pg_ctl --help # Trying to delete ...
ssppjj's user avatar
  • 21
0 votes
0 answers
22 views

when try to cd, tab can not switch different folder options when using oh my zsh

Questions: when try to cd , tab once will show directories options but tap once again ,it will just enter the first folder like this ,not switch between them if I continue press tab , it will just ...
decay's user avatar
  • 1
2 votes
1 answer
141 views

Oh-my-zsh deletes output of successful command with "FAIL: 141"

My Oh-my-zsh does the following: When I run the git log --pretty --oneline command, it shows me a long list of commits, as expected. As soon as I hit q, it suddenly disappears with the below output: ...
ritratt's user avatar
  • 131
0 votes
0 answers
224 views

How do I change an oh-my-zsh bindkey that a plug-in set?

You can find most of the context on this github comment. I installed the zsh-autocomplete plugin and it adds a feature I don't want: pressing up fills the page with a menu of previous commands I've ...
Daniel Kaplan's user avatar
1 vote
0 answers
70 views

How do I prevent zsh from expanding shell history when I press space?

I can reproduce this issue on cygwin and Ubuntu wsl's oh-my-zsh shell, but my bash shell works the way I want. My intent is to run these two lines on the command line: npm rm plugin-alias npm i -D ...
Daniel Kaplan's user avatar
1 vote
3 answers
1k views

xargs: run a command for each line and separate arguments with whitespace?

I can reproduce this issue on cygwin bash and oh-my-zsh with wsl.exe. My intent is to run these two lines on the command line: npm rm plugin-alias npm i -D plugin-alias Here is how I'm trying to do ...
Daniel Kaplan's user avatar
2 votes
0 answers
28 views

zsh: don't remember certain commands [duplicate]

I use zsh and oh-my-zsh. Whenever I use a command that has rm -rf, or a command that starts with space, I want it to not be saved in the shell history. Is that possible?
Ram Rachum's user avatar
  • 1,795
2 votes
1 answer
273 views

How to retain color output with custom zsh function?

I am setting up a zsh shell environment and I wanted to try writing a simple function for my own learning purposes: # ~/.zsh-extensions/conda_which # get version in conda env function conda_which { ...
SumNeuron's user avatar
  • 205
1 vote
1 answer
166 views

end-of-line widget not working in functions (zsh-autosuggestions)

Why will this bindkey '^ ' end-of-line works, and accept the suggestion, but function accept { zle end-of-line } zle -N accept bindkey '^ ' accept this won't work. I don't understand why. I also ...
vdegennedev's user avatar
0 votes
0 answers
179 views

Inconsistent behavior of zsh autocompletion after oh-my-zsh install

I recently got a fresh install of Manjaro KDE and used oh-my-zsh with the powerlevel10k theme to set up my terminal, but now I am seeing strange, inconsistent behavior. If I open a terminal, I have ...
lcleary's user avatar
1 vote
0 answers
34 views

How to expand partial paths in Zsh when using git commands?

I use Zsh as my shell, OMZ as my package manager, and have the git plugin in my plugins list. Whenever I type a command like cd or vim followed by a partial path, the shell expands the partial path on ...
Matt's user avatar
  • 161
0 votes
0 answers
53 views

Can I avoid the screen sessions to change the title of the terminal?

I'm using zsh and Oh-my-Zsh Every time I run a command the title of my terminal changes to the latest one, and I want to keep that behavior, but when I create a 'screen' session and I want to be able ...
rugobal's user avatar
0 votes
1 answer
125 views

How to list only the aliases defined by the user?

I'm using the ZSH and defined some aliases (stored in multiple fines, that are loaded in the ~/.zshrc). That is working fine. Executing the command alias allows to list all available aliases. Now I'd ...
automatix's user avatar
  • 189
1 vote
0 answers
334 views

Zsh - History "up arrow" only searches from beginning of previous command, not working for middle

For example, if I have a command in the past like cd ~/dir I am not able to find it by entering with dir then pressing the "up" arrow. This is for zsh with oh-my-zsh. What I've tried that ...
Paul Smith's user avatar
0 votes
2 answers
1k views

oh-my-zsh No such file or directory even after installation

I just installed oh-my-zsh. Things worked fine. Then I tried commenting out export ZSH="~/.oh-my-zsh" After this, when I uncommented the line back, I keep getting the below error. However, &...
SyncMaster's user avatar
1 vote
1 answer
299 views

oh-my-zsh prompt substitution

I'm modifying the intika2 theme in oh-my-zsh to add the current pyenv setting to my prompt. OMZ includes a pyenv_prompt_info command & I added it to the LEFTINFOS variable in the intika2 theme to ...
Todd Vanyo's user avatar
2 votes
0 answers
594 views

Autocomplete of diff command not working in zsh / oh-my-zsh

On MacOS I am using oh-my-zsh with no customization that I know of. Autocompletion is mostly working quite nicely and I'm very happy with it. But for some reason the diff command is different. ➜ ls ...
Tom Aldcroft's user avatar
0 votes
1 answer
114 views

Prevent ZSH from saving specific command [duplicate]

Is there a way to Prevent ZSH from saving specific command in history. I dont want zsh to save git clone //url command.
Shailesh's user avatar
0 votes
0 answers
227 views

Change the behavior of zsh-z tab completion

I've recently setup zsh-z with oh-my-zsh, and I'm struggling to get tab completion working properly. What I'm currently experiencing when I press tab is that I get a menu of possible matches from my ....
bdben's user avatar
  • 63
0 votes
0 answers
220 views

Select words using Ctrl+Shift+[forward/backward arrow keys] and characters using Shift+[forward/backward arrow keys]

I installed ubuntu budgie today and installed terminator. I'm using to copying in the terminal backward and forward with Ctrl+shift+arrows and shift+arrows. But now, shift+backward outputs the letter &...
markov's user avatar
  • 1
1 vote
0 answers
113 views

Switching to zsh from bash without root breaks the system login

I am trying to use zsh as the default shell on a system where bash as default shell. Since I don't have the root permission, I was trying to use bashrc to switch over shell to zsh at the time of login....
sundar_ima's user avatar
3 votes
0 answers
200 views

How to add the expanded version of commands involving fzf to history?

Say I would like to edit a file ./long/path/to/my/file/test.py with Vim, but I do not remember the path to the file. In this case, I would run vim `fzf` to use fuzzy search to find and edit the file. ...
Matt's user avatar
  • 161
2 votes
0 answers
257 views

Replicate backward search with fzf in zsh

I've been struggling to find a simple answer to this and it seems like it is not trivial to customise the default integration of fzf/zsh (would like to understand if I'm wrong here). I am looking for ...
rbhalla's user avatar
  • 121
1 vote
2 answers
451 views

How can I/Should I default flags when running a command?

For context, I'm using zsh. Every time I use locate, I want to pass the -i and -A flags. Usually, if I can get away with it, I create an alias with the same name as the existing command to do this. ...
Daniel Kaplan's user avatar
1 vote
0 answers
495 views

how to debug oh-my-zsh auto-completion not working?

The title largely says it. Most of my auto-completion is working, but git is not. It does not complete commands, e.g. git check<tab>, nor does it complete branches, e.g. git checkout ge<tab&...
deitch's user avatar
  • 463
1 vote
1 answer
2k views

correct way of writing functions in zsh

While working on a project, I often have to run these commands sequentially git add --all; git commit -m "some commit message"; git push to push the recent work to the remote repository. I ...
monte's user avatar
  • 113
0 votes
1 answer
327 views

ZSH Theme only partially applied

having this weird behavior where only the date themeing on the right is being applied by my chosen jonathan theme for zsh. just downloaded and set it up using debains suggested rc file. Im assuming ...
atunamelt's user avatar
0 votes
0 answers
228 views

Custom alias outside .zshrc but ZSH_CUSTOM doesn't work in kali

For reference this is not a duplicate: I reviewed other Q and A like this but it doesn't work for me. Background: I'm using Kali in parallels. To keep my .zshrc file tidy I decided to mkdir ...
ShifraSec's user avatar
0 votes
0 answers
642 views

new tmux pane not sourcing zshrc file

Using iTerm2 with tmux and zsh. I have an issue that new tmux panes doesn't source ~/.zshrc file I have customized my terminal (when running source ~/.zshrc manually it works) but when opening new ...
Eyal Solomon's user avatar
1 vote
3 answers
941 views

How do I make an alias for a command with sudo

I want to add two aliases, so one executes a command when non sudo, and the other executes a command when sudo, like this: alias v = 'nvim' alias 'sudo v' = 'sudo -E nvim ' I also have set alias sudo=...
Ramita's user avatar
  • 11
1 vote
0 answers
917 views

why is zsh oh-my-zsh prompt slow on ubuntu 22.04

I need some help determining why my shell is slow and what I can do to fix it. This is a new machine running Ubuntu 22.04. Not only does it start slow, but enter/return is also quite slow. I have ...
Kay's user avatar
  • 113
3 votes
1 answer
865 views

zsh in tabby separate history for each tab

I want to keep history separated for each tab (even for split windows within one tab). I therefore found a solution to add these two lines after source $ZSH/oh-my-zsh.sh: source $ZSH/oh-my-zsh.sh ...
Arie's user avatar
  • 131
1 vote
4 answers
2k views

How to get a shorter Path prompt in powerline10k / zsh?

everyone! In my iterm2 (with zsh, oh-my.zsh and powerline2) terminal if I go to certain directories I have a prompt like this: $ pokemon/electric/pichu/pikachu/raichu I'd like to have a shorter, but ...
mabvmex's user avatar
  • 21
0 votes
1 answer
247 views

opening default path for root user

It may be trivial what I say, but I need to change the default opening path that OH My ZSH has. since no matter where I preposition myself in a file path (example: /home/username/Downloads/owt), when ...
RedBook's user avatar
1 vote
1 answer
1k views

Variable Scope in ZSH: How to access global variables from within function?

I have an ever-expanding .zshrc file that was getting out of hand so I decided to try to fix it by breaking it into modular files and sourcing each of them. This works for the most part, but I seem ...
undefined's user avatar
  • 123
0 votes
0 answers
72 views

What triggers the j-k keys to scroll through prev/next commands and how do I properly get out of this mode (without ctlr-c)?

I've been using zsh with oh-my-zsh for several months now with vi commands. Frequently, the command line seems to "lock up" and become unresponsive to input. I chalked it up to some kind of ...
StevieD's user avatar
  • 875
0 votes
0 answers
20 views

command `ll` with wildcard matching is not working as expected [duplicate]

I am using mac with oh my zsh installed current omz version ➜ omz version [02/28/22 | 18:49:04] ...
Zheng's user avatar
  • 1
1 vote
0 answers
231 views

How to fix .zsh_history opening up every time I start the terminal

I tried to delete my zsh history following this answer by @WebEpic. The issue is that now, every time I open my terminal, the .zsh_history opens via Vim. I need to quit it using :qa then it would go ...
kiyomi's user avatar
  • 111

1
2 3 4 5 6