GithubHelp home page GithubHelp logo

ohmyzsh / ohmyzsh Goto Github PK

View Code? Open in Web Editor NEW
168.8K 2.7K 25.6K 11.78 MB

πŸ™ƒ A delightful community-driven (with 2,300+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.

Home Page: https://ohmyz.sh

License: MIT License

Shell 98.59% Python 1.33% Makefile 0.07%
shell zsh-configuration theme terminal productivity zsh cli cli-app themes plugins

ohmyzsh's Introduction

Oh My Zsh

Oh My Zsh is an open source, community-driven framework for managing your zsh configuration.

Sounds boring. Let's try again.

Oh My Zsh will not make you a 10x developer...but you may feel like one.

Once installed, your terminal shell will become the talk of the town or your money back! With each keystroke in your command prompt, you'll take advantage of the hundreds of powerful plugins and beautiful themes. Strangers will come up to you in cafΓ©s and ask you, "that is amazing! are you some sort of genius?"

Finally, you'll begin to get the sort of attention that you have always felt you deserved. ...or maybe you'll use the time that you're saving to start flossing more often. 😬

To learn more, visit ohmyz.sh, follow @ohmyzsh on Twitter, and join us on Discord.

CI X (formerly Twitter) Follow Mastodon Follow Discord server Gitpod ready

Table of Contents

Getting Started

Operating System Compatibility

O/S Status
Android βœ…
freeBSD βœ…
LCARS πŸ›Έ
Linux βœ…
macOS βœ…
OS/2 Warp ❌
Windows (WSL2) βœ…

Prerequisites

  • Zsh should be installed (v4.3.9 or more recent is fine but we prefer 5.0.8 and newer). If not pre-installed (run zsh --version to confirm), check the following wiki instructions here: Installing ZSH
  • curl or wget should be installed
  • git should be installed (recommended v2.4.11 or higher)

Basic Installation

Oh My Zsh is installed by running one of the following commands in your terminal. You can install this via the command-line with either curl, wget or another similar tool.

Method Command
curl sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
wget sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fetch sh -c "$(fetch -o - https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Alternatively, the installer is also mirrored outside GitHub. Using this URL instead may be required if you're in a country like India or China, that blocks raw.githubusercontent.com:

Method Command
curl sh -c "$(curl -fsSL https://install.ohmyz.sh/)"
wget sh -c "$(wget -O- https://install.ohmyz.sh/)"
fetch sh -c "$(fetch -o - https://install.ohmyz.sh/)"

Note that any previous .zshrc will be renamed to .zshrc.pre-oh-my-zsh. After installation, you can move the configuration you want to preserve into the new .zshrc.

Manual Inspection

It's a good idea to inspect the install script from projects you don't yet know. You can do that by downloading the install script first, looking through it so everything looks normal, then running it:

wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
sh install.sh

If the above URL times out or otherwise fails, you may have to substitute the URL for https://install.ohmyz.sh to be able to get the script.

Using Oh My Zsh

Plugins

Oh My Zsh comes with a shitload of plugins for you to take advantage of. You can take a look in the plugins directory and/or the wiki to see what's currently available.

Enabling Plugins

Once you spot a plugin (or several) that you'd like to use with Oh My Zsh, you'll need to enable them in the .zshrc file. You'll find the zshrc file in your $HOME directory. Open it with your favorite text editor and you'll see a spot to list all the plugins you want to load.

vi ~/.zshrc

For example, this might begin to look like this:

plugins=(
  git
  bundler
  dotenv
  macos
  rake
  rbenv
  ruby
)

Note that the plugins are separated by whitespace (spaces, tabs, new lines...). Do not use commas between them or it will break.

Using Plugins

Each built-in plugin includes a README, documenting it. This README should show the aliases (if the plugin adds any) and extra goodies that are included in that particular plugin.

Themes

We'll admit it. Early in the Oh My Zsh world, we may have gotten a bit too theme happy. We have over one hundred and fifty themes now bundled. Most of them have screenshots on the wiki (We are working on updating this!). Check them out!

Selecting A Theme

Robby's theme is the default one. It's not the fanciest one. It's not the simplest one. It's just the right one (for him).

Once you find a theme that you'd like to use, you will need to edit the ~/.zshrc file. You'll see an environment variable (all caps) in there that looks like:

ZSH_THEME="robbyrussell"

To use a different theme, simply change the value to match the name of your desired theme. For example:

ZSH_THEME="agnoster" # (this is one of the fancy ones)
# see https://github.com/ohmyzsh/ohmyzsh/wiki/Themes#agnoster

Note: many themes require installing a Powerline Font or a Nerd Font in order to render properly. Without them, these themes will render weird prompt symbols

Open up a new terminal window and your prompt should look something like this:

Agnoster theme

In case you did not find a suitable theme for your needs, please have a look at the wiki for more of them.

If you're feeling feisty, you can let the computer select one randomly for you each time you open a new terminal window.

ZSH_THEME="random" # (...please let it be pie... please be some pie..)

And if you want to pick random theme from a list of your favorite themes:

ZSH_THEME_RANDOM_CANDIDATES=(
  "robbyrussell"
  "agnoster"
)

If you only know which themes you don't like, you can add them similarly to an ignored list:

ZSH_THEME_RANDOM_IGNORED=(pygmalion tjkirch_mod)

FAQ

If you have some more questions or issues, you might find a solution in our FAQ.

Advanced Topics

If you're the type that likes to get their hands dirty, these sections might resonate.

Advanced Installation

Some users may want to manually install Oh My Zsh, or change the default path or other settings that the installer accepts (these settings are also documented at the top of the install script).

Custom Directory

The default location is ~/.oh-my-zsh (hidden in your home directory, you can access it with cd ~/.oh-my-zsh)

If you'd like to change the install directory with the ZSH environment variable, either by running export ZSH=/your/path before installing, or by setting it before the end of the install pipeline like this:

ZSH="$HOME/.dotfiles/oh-my-zsh" sh install.sh

Unattended Install

If you're running the Oh My Zsh install script as part of an automated install, you can pass the --unattended flag to the install.sh script. This will have the effect of not trying to change the default shell, and it also won't run zsh when the installation has finished.

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended

If you're in China, India, or another country that blocks raw.githubusercontent.com, you may have to substitute the URL for https://install.ohmyz.sh for it to install.

Installing From A Forked Repository

The install script also accepts these variables to allow installation of a different repository:

  • REPO (default: ohmyzsh/ohmyzsh): this takes the form of owner/repository. If you set this variable, the installer will look for a repository at https://github.com/{owner}/{repository}.

  • REMOTE (default: https://github.com/${REPO}.git): this is the full URL of the git repository clone. You can use this setting if you want to install from a fork that is not on GitHub (GitLab, Bitbucket...) or if you want to clone with SSH instead of HTTPS ([email protected]:user/project.git).

    NOTE: it's incompatible with setting the REPO variable. This setting will take precedence.

  • BRANCH (default: master): you can use this setting if you want to change the default branch to be checked out when cloning the repository. This might be useful for testing a Pull Request, or if you want to use a branch other than master.

For example:

REPO=apjanke/oh-my-zsh BRANCH=edge sh install.sh

Manual Installation

1. Clone The Repository
git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh
2. Optionally, Backup Your Existing ~/.zshrc File
cp ~/.zshrc ~/.zshrc.orig
3. Create A New Zsh Configuration File

You can create a new zsh config file by copying the template that we have included for you.

cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
4. Change Your Default Shell
chsh -s $(which zsh)

You must log out from your user session and log back in to see this change.

5. Initialize Your New Zsh Configuration

Once you open up a new terminal window, it should load zsh with Oh My Zsh's configuration.

Installation Problems

If you have any hiccups installing, here are a few common fixes.

  • You might need to modify your PATH in ~/.zshrc if you're not able to find some commands after switching to oh-my-zsh.
  • If you installed manually or changed the install location, check the ZSH environment variable in ~/.zshrc.

Custom Plugins And Themes

If you want to override any of the default behaviors, just add a new file (ending in .zsh) in the custom/ directory.

If you have many functions that go well together, you can put them as a XYZ.plugin.zsh file in the custom/plugins/ directory and then enable this plugin.

If you would like to override the functionality of a plugin distributed with Oh My Zsh, create a plugin of the same name in the custom/plugins/ directory and it will be loaded instead of the one in plugins/.

Enable GNU ls In macOS And freeBSD Systems

The default behaviour in Oh My Zsh is to use BSD ls in macOS and freeBSD systems. If GNU ls is installed (as gls command), you can choose to use it instead. To do it, you can use zstyle-based config before sourcing oh-my-zsh.sh:

zstyle ':omz:lib:theme-and-appearance' gnu-ls yes

Note: this is not compatible with DISABLE_LS_COLORS=true

Skip Aliases

If you want to skip default Oh My Zsh aliases (those defined in lib/* files) or plugin aliases, you can use the settings below in your ~/.zshrc file, before Oh My Zsh is loaded. Note that there are many different ways to skip aliases, depending on your needs.

# Skip all aliases, in lib files and enabled plugins
zstyle ':omz:*' aliases no

# Skip all aliases in lib files
zstyle ':omz:lib:*' aliases no
# Skip only aliases defined in the directories.zsh lib file
zstyle ':omz:lib:directories' aliases no

# Skip all plugin aliases
zstyle ':omz:plugins:*' aliases no
# Skip only the aliases from the git plugin
zstyle ':omz:plugins:git' aliases no

You can combine these in other ways taking into account that more specific scopes takes precedence:

# Skip all plugin aliases, except for the git plugin
zstyle ':omz:plugins:*' aliases no
zstyle ':omz:plugins:git' aliases yes

A previous version of this feature was using the setting below, which has been removed:

zstyle ':omz:directories' aliases no

Instead, you can now use the following:

zstyle ':omz:lib:directories' aliases no

Disable async git prompt

Async prompt functions are an experimental feature (included on April 3, 2024) that allows Oh My Zsh to render prompt information asyncronously. This can improve prompt rendering performance, but it might not work well with some setups. We hope that's not an issue, but if you're seeing problems with this new feature, you can turn it off by setting the following in your .zshrc file, before Oh My Zsh is sourced:

zstyle ':omz:alpha:lib:git' async-prompt no

Notice

This feature is currently in a testing phase and it may be subject to change in the future. It is also not currently compatible with plugin managers such as zpm or zinit, which don't source the init script (oh-my-zsh.sh) where this feature is implemented in.

It is also not currently aware of "aliases" that are defined as functions. Example of such are gccd, ggf, or ggl functions from the git plugin.

Getting Updates

By default, you will be prompted to check for updates every 2 weeks. You can choose other update modes by adding a line to your ~/.zshrc file, before Oh My Zsh is loaded:

  1. Automatic update without confirmation prompt:

    zstyle ':omz:update' mode auto
  2. Just offer a reminder every few days, if there are updates available:

    zstyle ':omz:update' mode reminder
  3. To disable automatic updates entirely:

    zstyle ':omz:update' mode disabled

NOTE: you can control how often Oh My Zsh checks for updates with the following setting:

# This will check for updates every 7 days
zstyle ':omz:update' frequency 7
# This will check for updates every time you open the terminal (not recommended)
zstyle ':omz:update' frequency 0

Updates Verbosity

You can also limit the update verbosity with the following settings:

zstyle ':omz:update' verbose default # default update prompt

zstyle ':omz:update' verbose minimal # only few lines

zstyle ':omz:update' verbose silent # only errors

Manual Updates

If you'd like to update at any point in time (maybe someone just released a new plugin and you don't want to wait a week?) you just need to run:

omz update

Magic! πŸŽ‰

Uninstalling Oh My Zsh

Oh My Zsh isn't for everyone. We'll miss you, but we want to make this an easy breakup.

If you want to uninstall oh-my-zsh, just run uninstall_oh_my_zsh from the command-line. It will remove itself and revert your previous bash or zsh configuration.

How Do I Contribute To Oh My Zsh?

Before you participate in our delightful community, please read the code of conduct.

I'm far from being a Zsh expert and suspect there are many ways to improve – if you have ideas on how to make the configuration easier to maintain (and faster), don't hesitate to fork and send pull requests!

We also need people to test out pull requests. So take a look through the open issues and help where you can.

See Contributing for more details.

Do Not Send Us Themes

We have (more than) enough themes for the time being. Please add your theme to the external themes wiki page.

Contributors

Oh My Zsh has a vibrant community of happy users and delightful contributors. Without all the time and help from our contributors, it wouldn't be so awesome.

Thank you so much!

Follow Us

We're on social media:

Merchandise

We have stickers, shirts, and coffee mugs available for you to show off your love of Oh My Zsh. Again, you will become the talk of the town!

License

Oh My Zsh is released under the MIT license.

About Planet Argon

Planet Argon

Oh My Zsh was started by the team at Planet Argon, a Ruby on Rails development agency. Check out our other open source projects.

ohmyzsh's People

Contributors

apjanke avatar betawaffle avatar bobwilliams avatar caarlos0 avatar carlosala avatar curiousstranger avatar dimensi0n avatar eproxus avatar felipec avatar fred-o avatar geoffgarside avatar gsemet avatar hakanensari avatar henryyan avatar imajes avatar lfdm avatar mahi97 avatar mbologna avatar mcornella avatar mekanics avatar mrtazz avatar ncanceill avatar oknowton avatar patrickelectric avatar psprint avatar ptillemans avatar robbyrussell avatar slavaganzin avatar thcipriani avatar to1ne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ohmyzsh's Issues

git diff auto-complete on filenames

It seems to auto-complete on branches and not filenames. I can see how people would want one or the other... any thoughts on how to make it work on filenames?

rvm breakage

The file lib/rvm.zsh actually breaks rvm.

As in it didn't work before i removed it, but after i did it worked. I also went through and removed most of the "return" statements in code i knew i was loading and using, just for safety's sake. I guess it's that return statement on line two of that file

Ubuntu keymappings

After installing zsh on Ubuntu 8.04.1, the keymappings became screwy. Backspace isn't working (only CTRL-H) and using the up arrow doesn't scroll through my command history as it used to in bash. This came from bindkey:

➜  ~  bindkey | grep delete
"^D" delete-char-or-list
"^H" backward-delete-char
"^?" delete-char

rake_completion.zsh old capistrano version

On line: 14 of rake_completion.zsh
cap show_tasks -q | cut -d " " -f 1 | sed -e '/^ *$/D' -e '1,2D'

there is this command "cap show_tasks" that doesn't exists anymore in cap 2.x so the function fails to create the .cap_tasks~ file.

If anybody can show me a .cap_tasks~ content I can try to change it to new version "cap -T"

no such file or directory error

Hi,

I uninstalled using uninstall_oh_my_zsh but I keep getting this error in my terminal now:

Last login: Tue Feb 16 10:14:05 on ttys000
/Users/gshankar/.zshrc:source:17: no such file or directory: /Users/gshankar/.oh-my-zsh/oh-my-zsh.sh

My other errors also look like this:
zsh: no such user or named directory:

Any idea how to fix this? I also seem to have lost some of the custom formatting options I specified in ~/.profile (in fact I can't seem to open my profile file anymore either...)

Empty ,zsh-update file

If you open a new terminal tab and it prompts you to upgrade and while that process is running... if you open another terminal, it'll wipe out the ~/.zsh-update file contents and you'll get this error every time you open a new terminal session.

Last login: Sat Dec 12 11:18:52 on console
You have mail.
/Users/robbyrussell/.oh-my-zsh/tools/check_for_upgrade.sh: line 8: 14590 - : syntax error: operand expected (error token is " ")

Ubuntu compatibility

I would really like oh-my-zsh to be Ubuntu-compatible. This is the output I get when running the installer:

david@david-laptop:~$ wget http://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
--2009-10-01 08:35:30--  http://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh
Resolving github.com... 207.97.227.239
Connecting to github.com|207.97.227.239|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 846 [text/plain]
Saving to: `STDOUT'

100%[======================================>] 846         --.-K/s   in 0s      

2009-10-01 08:35:30 (48,5 MB/s) - `-' saved [846/846]

Cloning Oh My Zsh...
Initialized empty Git repository in /home/david/.oh-my-zsh/.git/
remote: Counting objects: 363, done.
essing objects: 100% (155/155), done.
remote: Total 363 (delta 200), reused 347 (delta 193)
Receiving objects: 100% (363/363), 42.74 KiB, done.
Resolving deltas: 100% (200/200), done.
Looking for an existing zsh config...
Using the Oh My Zsh template file and adding it to ~/.zshrc
Copying your current PATH and adding it to the end of ~/.zshrc for you.
Time to change your default shell to zsh!
Password: chsh: PAM authentication failed
Hooray! Oh My Zsh has been installed.
sh: /bin/zsh: not found
sh: source: not found

There's a few errors in there. That said I don't know how hard they are to fix. I'm not into that kind of stuff. But it sure would be awesome to be able to use oh-my-zsh on Ubuntu! :)

Incorrect quoting for terminal title (via termsupport.zsh)

The current preexec in termsupport.zsh contains the following, minus sleep:
preexec () { print -Pn "\e]0;%n@%m: $1\a" ; sleep 3 }

Try executing it twice (once to set it), the second time it'll get used.
This will output the following then:
" ; sleep 3 }

According to Mikachu on #zsh it will always be problematic when using "print -P"

Apart from that, functions.zsh also defines precmd/preexec and has a "fixme" for this.

Errors if .ssh/known_hosts does not exist

Just setup a new Debian virtual machine and setup oh-my-ssh. When I login I get the following errors due to the absense of an ~/.ssh/known_hosts file

sed: can't read /home/wmoore/.ssh/known_hosts: No such file or directory
sed: can't read /home/wmoore/.ssh/known_hosts: No such file or directory

The references seem to be in lib/completion.zsh

A test for existence of the file probably should be done before adding the completions

cd autocomplete have entries beyond current directory

For example, I can type cd i[tab] and get 'icecast2' (which is in /usr/share) when I'm in my homefolder. cd D[tab](expecting Desktop and Downloads in the list) gives those + daemon, Debian-Exim and debian-tor. If I select daemon and press enter it prints ~daemon and I'm then in /usr/sbin (?!)

cd ..[tab](expecting ../) does not work either. Only when there are directories with two . in their names.

How do I disable this and use the standard zsh setting?
I'm running zsh 4.3.10 (i686-pc-linux-gnu)

Completion from history

I've noticed some people don't like this, but I do.
An example:
echo "Hello world" > test.txt
cat test.txt
echo ARROW UP
Should return:
echo "Hello world" > test.txt
But does return:
cat test.txt

I thought this setting is in the last 4 lines of lib/completion.zsh. So I've reactivated then locally, but without any result.

Currently I'm using zsh version zsh 4.3.10 (i386-apple-darwin10.2.0).

Error when in .git directory

When I cd to the .git directory I get errors:

[17:36:46] toine➜~ZSH(master)» cd .git 
fatal: This operation must be run in a work tree                                                                                                      
fatal: This operation must be run in a work tree

zsh: no matches found: -?

Well, this is a real weird issue, and there might not be a solution to it.

Our VCS at work uses the parameter -? to get help.
But when in zsh when I type:
vcsapp -?
I get the error:
zsh: no matches found: -?

I know zsh interprets the ? as a wildcard, which is good. But this one time it isn't.

Gem?

Since I first released oh-my-zsh, I've been wondering if I should bundle it up into a gem for easier installation and upgrades.

discuss..

Keep .rake_tasks out of project directory?

Would it be possible to store all .rake_tasks in a folder under ~/.oh_my_zsh? The quick and obvious fix is adding .rake_tasks to my git ignore file, but if they could get stored as ~/.oh_my_zsh/autocomplete/project_a/.rake_tasks I think it would be a much more slick implementation.

I'm pretty new to zsh but I'm enjoying your project, I may try to hack this implementation if it looks easy enough. Just a thought!

New plugin system

I've been kicking around the idea of extracting a bunch of the aliases that are baked into Oh My Zsh and moving them to plugins.

I want to make sure we provide a useful features for people, but don't think it should continue to have such a bias towards us Ruby/Rails/OSX developers . So... I am experimenting in this branch:

Feedback and ideas are welcome! Aiming to get something merged into master in the next few days.

Every command results in a number of empty lines before the result that is increasing

Installed oh-my-zsh (Mac OS Snow Leopard), noticed empty lines appearing after entering any command and before its result is displayed. The number of empty lines equals the number of lines in .zsh_history file, so as new unique commands are entered, the empty space keeps growing. By method of exclusion determined that the culprit is the following line in .oh-my-zsh/lib/aliases.zsh:

alias history='fc -l 1'

Once commented out, no empty lines appear between command and its result.

Screenshot: http://emberapp.com/glebd/images/zsh-is-misbehaving

check for upgrade syntax error

I upgraded oh my zsh today and am now getting this:

/Users/robbyrussell/.oh-my-zsh/tools/check_for_upgrade.sh: line 8: 14547 - : syntax error: operand expected (error token is " ")

How to remove fn + backspace key binding?

Hey on my Macbook Pro fn + backspace is normally 'delete right char' ...
On a Macbook there is no alternative key for doing this so the key bind is very annoying ...

Since i dont understand some stuff in the key-bindings.zsh i dont know how to disable it.
Thanks in advance!

Required zsh version

to1ne has been having problems with my jnrowe theme that are caused because I use features that his install doesn't support. Initially add-zsh-hook is causing the problem, but if the theme is fixed to work with versions that predate its inclusion that it would also mean changing the VCS_info usage too.

I'm just curious about the minimum version of zsh you wish to support is.

[I decided to open an issue so we can easily have other users chime in on what versions they feel should be supported, I hope that is okay.]

Rake completion works better without lib/rake_completion.zsh

Rake support seems to be baked directly into zsh (I'm on 4.3.10), there's no need to override it in lib/rake_completion.zsh

The default completion can autocomplete rake arguments and rake tasks even with descriptions. I think that lib/rake_completion.zsh should be deleted.

\n and \c not interpreted in sh scripts

Some sh scripts (upgrade.sh or check_for_upgrade.sh for example) use \n or \c in echoed strings, with a broken output (display the \n instead of a new line, at least on my gentoo and on my archlinux) :

   "Hooray! Oh My Zsh has been updated and/or is at the current version. \nAny new updates will be reflected when you start your next terminal session."

Using echo -e instead on echo in .sh scripts should solve this issue :)

When an update occurs, display git log of commits pulled

Every time I get an update, I get really curious what was updated and head on over to the repo to check out the previous commits. It would be neat to get a bit of a changelog after you update. It could be easy as doing a git command. I'll try to look into it, but any forkers out there are free to give an implementation a shot :).

Annoyance: not a fan of the . alias as it overrides the . command

with the . alias (alias .=pwd) I can't figure out what command replaces the . command for executing files.

For example, I have this inside my .zshrc to load a list of command aliases:

. $HOME/.aliases

With the . alias in place, it errors saying too many arguments to pwd command. If I remove the alias the command works fine but now I have to type three whole characters (pwd) to see where I'm at in the directory tree (not a huge issue since I added %~ to my prompt).

Currently I just have the "alias .=pwd" line commented out in my aliases.zsh file. Is there a different way around this problem?

Check for updates feature

In an effort to keep people using the latest and greatest updates to Oh My Zsh, I've been toying around with the idea of having a feature that'll check for updates (similar to how an application would). We have an upgrade_oh_my_zsh alias that'll run the upgrade.zsh script, which is basically a git pull. I'd like to come up with a non-intrusive way of letting people know that they should upgrade without requiring them to follow an RSS feed, twitter account, etc.

One idea that I had was that once a week, when opening a new terminal it'd prompt the person, "do you want to check for new updates to Oh My Zsh?"

How we'd accomplish this is to be determined. Anyone have any clever ideas that would avoid the following:

  • Triggering the question more than once a week (ie., when opening a new tab on the same day)
  • Not trying to upgrade when you're not online...
  • etc..?

Tab-completion of git makes the command move to the right

When I type "git co" and press TAB to complete to "git commit" this happens:
My command line looks like this before pressing tab:

[23:22:26] toine➜~ZSH git(master) » git co

And after pressing tab:

[23:23:01] toine➜~ZSH git(master) » git commit                            git commit

So the command has moved to the right (the cursor is at the end of the second "git commit").

I've noticed when the space it moves to the right equals the length of the string of your theme.
So when the $PROMPT equals "" the tab-completion is correct.

Recent patch messing with git

This file doesn't exist... seems to be locking on each prompt load

➜ ~planetargon git:(master) βœ— git st
fatal: Unable to create '.git/index.lock': File exists.

If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.

Taking ... one step further

I really love the aliasses like:
alias cd...='cd ../..'

But I would like to see them go one step further. Namely tab completion.
Tab completion works for ./ and ../, but not for .../.

I tried to figure out how to configure this. But I got lost in the documentation. Maybe there is somebody with more knowledge about zsh completion to fix this?

Thanks in advance.

known_hosts autocomplete not working

$ sed 's/^([^ ,]).$/\1/' ~/.ssh/known_hosts outputs
|1|zuHPNBYHBQdnAJuM4i/s4IkOFeI=|mCDR4UBlZERgnPgd0B/whnrWoAg=
...
not the hosts themselves.

Ubuntu - check for upgrade not working

This happens when I open a new terminal.

.oh-my-zsh/tools/check_for_upgrade.sh: 26: source: not found
.oh-my-zsh/tools/check_for_upgrade.sh: 26: arithmetic expression: expecting primary: "14518 - "
➜  ~

I'm using Ubuntu 9.04 with zsh-4.3.9-4ubuntu1

git is always dirty

right now, oh-my-zsh thinks my home directory is a brothel, every git repo is dirty!
git status show they're not. Tried some different themes, looks like not theme related.

gdb is a debugger.

Having gdb as an alias makes it ugly to call gdb, change it to something else please :(

Like gbd, there's gba for "git branch -a" and gdb for "git branch -d", it's inconsistent.

Annoying Appearance Bug

  1. When a new window or tab is created in Terminal, a % appears then half a screen of blank before the prompt.

Rake not auto completing

Rake is not auto-completing my available rake tasks. The weird part is that the auto-complete works the first time I have opened up a shell, but as soon as I try to auto-complete rake tasks again, it fails.

I have been using oh-my-zsh for about 2 months. I just updated to the latest because I thought that this rake issue might be fixed by now.

Try `stat --help' for more information.
stat: invalid option -- '%'
Try `stat --help' for more information.

_rake_does_task_list_need_generating:5: bad math expression: operand expected at `>='
stat: invalid option -- '%'
Try `stat --help' for more information.
stat: invalid option -- '%'
Try `stat --help' for more information.
_rake_does_task_list_need_generating:5: bad math expression: operand expected at `>='
stat: invalid option -- '%'
Try `stat --help' for more information.
stat: invalid option -- '%'
Try `stat --help' for more information.
_rake_does_task_list_need_generating:5: bad math expression: operand expected at `>='

This happens to me in Linux and OS X.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.