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 vote
2 answers
3k views

Using putty, Left and Right keys move cursor one word, instead of one char

I have looked for a solution to this OhMyZSH! problem for a few days now, but can't find a solution. Admittedly, I do not understand how zle really works, same for bindkey. Same goes for the way ...
Gunee's user avatar
  • 123
18 votes
4 answers
4k views

Per-directory history in zsh

I am happily using zsh since a while now, and I am quite satisfied with my history settings, which are: # Write to history immediately setopt inc_append_history # History shared among terminals ...
AkiRoss's user avatar
  • 613
13 votes
2 answers
2k views

`time echo` got no output

I'm using Mac, and I'm trying to time the command execution. If I do time echo it doesn't have any output But If I do time ls it does give me the output of time function Any idea why that ...
songyy's user avatar
  • 273
33 votes
2 answers
26k views

Start zsh with a custom zshrc

I want to be able to start zsh with a custom rc file similar to the command: bash --rc-file /path/to/file If this is not possible, then is it possible to start zsh, run source /path/to/file, then ...
hjkatz's user avatar
  • 433
12 votes
3 answers
2k views

Completion of words on the screen as in VIM (Bash or Tmux)

How can I configure Bash, Zsh or Tmux to complete the last matching identifier on the screen? Consider this common scenario: $ git fetch remote: Counting objects: 16, done. remote: Compressing ...
dotancohen's user avatar
  • 15.8k
30 votes
4 answers
20k views

First characters of the command repeated in the display when completing

The first two chars were repeated while I use Tab to do completion. In the screenshot below, cd is repeated. I have tried rxvt-unicdoe, xterm, terminator. All these terminal emulators have this ...
jilen's user avatar
  • 777
17 votes
5 answers
7k views

paste url into terminal(urxvt, zsh) failed, some characters get escaped

In recent months, I find that if I copy the URL in Chrome and then Shift-Insert in the urxvt, the pasted URL is escaped. For example, the original URL is: http://example.com/?a=c the pasted content ...
宇宙人's user avatar
  • 279
52 votes
2 answers
25k views

How to disable "auto cd" in zsh with oh-my-zsh

Googling this didn't show up any results. Here's what I mean: I have a binary file named x in my path (not the current folder, but it is in the PATH), and also a folder with the same name in the ...
Gabi Purcaru's user avatar
42 votes
7 answers
16k 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----...
Alexander Ljungberg's user avatar
25 votes
1 answer
5k views

how to find file defining an alias

I am having a problem I'm not sure how to get around. Somehwhere on my system, I have an alias defined as such: alias subl=\''/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl'\' I ...
Ali Samii's user avatar
  • 441
23 votes
7 answers
27k views

zsh compinit: insecure directories, run compaudit for list

When I try to login as root, this warning comes up. luvpreet@DHARI-Inspiron-3542:/$ sudo su Password: zsh compinit: insecure directories, run compaudit for list. Ignore insecure directories and ...
Luv33preet's user avatar
18 votes
1 answer
3k views

How to disable autocorrection for sudo [command] in zsh?

I have zsh and oh-my-zsh with default values and can't figure out how to turn off autocorrection for specific commands, that I often use, such as: sudo mc or sudo gem update. The thing is that I have ....
Alexei Danchenkov's user avatar
11 votes
1 answer
18k views

zsh HISTFILE - still read from ~/.zsh_history

I set my $HISTFILE env var to something custom, and my zsh is indeed writing to the new histfile. But when using up-arrow or other history-searching capabilities, it still reads from ~/.zsh_history. ...
lajarre's user avatar
  • 165
8 votes
1 answer
11k 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 ...
gronostaj's user avatar
  • 688
4 votes
4 answers
1k views

$PATH duplication issues

If I do echo $PATH I get the following: /usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/usr/local/share/npm/bin:/usr/local/share/python:/opt/X11/bin:/Users/kh/.rvm/bin:/usr/bin:/bin:/usr/sbin:/...
showFocus's user avatar
  • 141
4 votes
1 answer
2k views

Broken history search after upgrade of oh-my-zsh

I did the auto-upgrade of oh-my-zsh a few days ago. Now my filtered history (type a few letters and up arrow) no longer works. I did not realize how dependent I became on it. EDIT: For example, I ...
JHo's user avatar
  • 143
4 votes
3 answers
3k views

oh-my-zsh completion on home directory names

I recently switched to zsh from bash, and I'm using oh-my-zsh. There's a completion behaviour I don't want: in any directory, the list of autocompletion candidates seems to include the names of all ...
jogloran's user avatar
  • 175
4 votes
3 answers
7k views

zsh alias being overridden somehow

I'm on a system running OS X 10.8.5. I recently tried to alias ls to ls -G -la command. I opened up ~/.zshrc, put in the alias, relaunched the terminal, but the change didn't take effect. Upon ...
Jules's user avatar
  • 2,084
4 votes
1 answer
4k views

Find not working

The find command is not working as expected on my OSX with oh-my-zsh. A few examples: $ find . -name test find: .: Invalid argument $ find usage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [...
Najki's user avatar
  • 143
3 votes
2 answers
4k views

How to define a function that handles `command not found`?

I'd like to define a function that is called, whenever a shell-user types a command that does not exist. In my case I'd like to log the errors and try alternative commands. currently, when typing e.g....
Edward's user avatar
  • 285
2 votes
1 answer
404 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
2 votes
1 answer
3k views

Interactively switching zsh themes while running powerline

I'm a long-time bash user just getting used to running zsh, oh-my-zsh, and powerline. I like the setup very much, but have one frustration I can't figure out how to solve. I occasionally need to copy ...
Palpatim's user avatar
2 votes
1 answer
3k views

How to make oh-my-zsh history behavior similar to Bash's?

I recently switched to oh-my-zsh and I can't get used to the way the arrow up key works. When I enter ssh for example and press up, it only shows me commands starting with ssh while I'd prefer it to ...
d33tah's user avatar
  • 1,361
2 votes
1 answer
587 views

How can I set zsh to use physical paths?

In bash, I can put set -P in my .bashrc, and to use absolute paths. That is, if I change to a directory through a symbolic link, and then use cd .., it takes me to that directory's canonical parent, ...
Dan's user avatar
  • 9,482
2 votes
1 answer
2k views

Pasting text in zsh in vi mode

I changed input mode in zsh to vi with set -o vi, but that created problems with pasting text. While trying to do cmd-v (MacOS) in the insert mode, zsh is pasting only a fraction of the clipboard ...
Anton Tarasenko's user avatar
1 vote
1 answer
505 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 ...
vfclists's user avatar
  • 7,487
1 vote
1 answer
3k views

Use different profiles with ZSH (in different terminal apps)

I wish to use different ZSH profiles with different terminal apps on macOS. For example, use a profile with some prompt configuration A in iTerm, use a profile with a different set of aliases in ...
SGMoore's user avatar
  • 11
0 votes
1 answer
54 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
  • 30.4k
0 votes
1 answer
4k views

Get back to default zsh theme in kali linux

I tried to change the default zsh theme with oh-my-zsh from their github repository and I just edited .zshrc switching from the default theme to another one and it just somehow went wrong cause now I ...
techsk8's user avatar
  • 591
0 votes
0 answers
30 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 ...
xvy.'s user avatar
  • 1