* Test only for the presence of a .git directory in virtualenvwrapper
Instead of using both $(git rev-parse --show-toplevel) and a check for
a .git directory, use just the latter. As well as being redundant
the former does not work quite so well when using multiple worktrees;
each worktree will be treated as a separate project.
* Unset ENV_NAME & deactivate if no virtualenv found
This addresses #4603 without breaking current behaviour (where current
behaviour is correct).
When changing directories, if there is no environment matching
ENV_NAME, ENV_NAME is emptied and deactivate called if there is a
current environment active (based on CD_VIRTUAL_ENV).
* Use path comparison not string comparison for paths
This will solve part of issue #4255 where WORKON_HOME is defined with a
trailing slash or not normalised in some way, as well as instances
where symlinks are used, and any other instances where constructed
paths don't exactly match even though they go to the same file.
Co-authored-by: Robby Russell <robby@planetargon.com>
* `rdmd` is aliased to `rake db:migrate:down`
* `rdmu` is aliased to `rake db:migrate:up`
* These tasks allow you to run a specific migration up or down by
specifying the appropriate `VERSION` env variable, which contains
the numerical prefix of the migration's filename
* ssh-agent: lock this script with a mkdir style mutex
This script is a kind of singleton pattern and is not reentrant.
If several shells are oppened in a fast sequence, then several
independent ssh-agents would be created, which is not acceptable.
A mutex is required.
Signed-off-by: Nuno Goncalves <nunojpg@gmail.com>
* ssh-agent: only start agent if .ssh dir exists
To use the same profile system-wide, it might happen
that the .ssh directory does not exist
(typically $HOME/.ssh/). This would trigger a error.
Creating the directory would be a option, but it
usually will not make sense to do so because it means
the user doesn't have ssh keys or config.
Signed-off-by: Nuno Goncalves <nunojpg@gmail.com>
* ssh-agent: adds lazy option to disable key loading on start
Option is documented on updated README.md
Signed-off-by: Nuno Goncalves <nunojpg@gmail.com>
* ssh-agent: simplify agent-forwarding checking
Signed-off-by: Nuno Goncalves <nunojpg@gmail.com>
Co-authored-by: Robby Russell <robby@planetargon.com>
By default, cargo provides alias for some commonly used functions. This patch
makes it that those alias will complete the same as their full commands.
Default alias:
b -> build
c -> check
t -> test
r -> run
Since cargo allows users to define custom alias it would be nice if
oh-my-zsh automatically detected those and preformed completions as such
but that would be a much more complex patch.
`pk-command-not-found` doesn't accept `--` as an argument. This is what happens when `--` is the first argument:
```
$ gem
zsh: --: command not found...
```
As documented in the README, `npm i -f` forces npm to install the specified packages from a remote
package registry, even if local copies exist on disk caches.
On large mercurial projects, using `hg status` to show dirty prompt
causes significant delay.
This commit checks a local hg config value of `oh-my-zsh.hide-dirty` to
skip dirty check.
Users who wish to skip dirty check can add this to their `.hg/hgrc`
file.
```
[oh-my-zsh]
hide-dirty = 1
```
This config value uses the same naming as ones found for git, in file
lib/git.zsh.
This commit fixes an issue in the gentoo theme introduced in 3bb5e977.
Due to incorrect line width calculations, colors are incorrectly applied
when using tab.
Fixes#9778
Signed-off-by: Thomas De Backer <mosterdt@debacker.me>
BREAKING CHANGE: the various update aliases will no longer run `abs` and `aur`, which are either
deprecated or nonexistent. See https://archlinux.org/news/deprecation-of-abs/ for more.