1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-23 12:51:58 +00:00
Commit graph

58 commits

Author SHA1 Message Date
Kyle Laker
d24a9dbccc
agnoster: fix git working tree check (#9072)
`git rev-parse --is-inside-work-tree` does not have a different exit
code when not within a work tree; the difference is in the output,
either "true" when in a work tree, or "false" when not.

The if was modified similarly to the check for the hide-status config,
which also parses command output rather than exit code.

Co-authored-by: Kyle Laker <klaker@easydynamics.com>
2020-07-01 19:05:53 +02:00
Marc Cornellà
c1b798aff3
agnoster: fix bzr prompt with breezy installed (#8646)
* Change indentation to 2 spaces in prompt_bzr function
* Check if in a bzr repository and optimize bzr calls in prompt_bzr
2020-02-19 00:16:54 +01:00
Marc Cornellà
89366be43f
Revert "agnoster: fix VIRTUAL_ENV_DISABLE_PROMPT logic (#8050)" (#8061)
This reverts commit 59c1ec80aa.
2019-08-06 18:01:32 +02:00
Rocky
59c1ec80aa agnoster: fix VIRTUAL_ENV_DISABLE_PROMPT logic (#8050)
Fixes #7985
2019-07-31 09:23:50 +02:00
David Dejori
8db0f352e8 agnoster: remove empty line (#7775) 2019-04-18 18:27:20 +02:00
Rob Lugton
83d1139432 agnoster: show AWS_PROFILE in prompt (#6621) 2019-03-23 19:20:28 +01:00
Marc Cornellà
2fce9a4d44
agnoster: use %n instead of $USER to fix quoting
Fixes #7268

With `$USER`, we'd need to quote it in case special characters like `\` are present in
the $USER value, like if the user is part of an AD domain.

With `%n` the quoting is done automatically by zsh.
See http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Login-information
2018-10-17 20:53:07 +02:00
Marc Cornellà
e107b85e3a
agnoster: fix prompt_status error (#6450)
This commit fixes the runtime error that says:

  prompt_status:2: symbols: attempt to assign array value to non-array

It trips over a local array which is not properly declared.
2018-09-26 17:23:31 +02:00
Marc Cornellà
a3d13eb76a
fix invalid syntax in old zsh versions 2018-09-26 17:19:59 +02:00
Carlo Dapor
afa8dc46ec Fix agnoster initial diagnostic error
This PR fixes the runtime error that displays this:

```log
prompt_status:2: symbols: attempt to assign array value to non-array
```.

It trips over a local array which is not properly declared.
2018-09-25 21:46:27 +02:00
Marten Seemann
150a3c9c83 agnoster: respect git config oh-my-zsh.hide-status (#6362) 2018-09-24 14:11:57 +02:00
Frederic Crozat
e4d2d27af4 Agnoster: solarized light variant (#4680)
* agnoster: do not hardcode black foreground.

This would allow easy customization when using light color schemes, like
solarized-light

* agnoster: implement light theme variant

Use same variable as in blinks theme, to detect if solarized theme used
is a light or dark one.
2018-08-19 22:28:37 +02:00
Janosch Schwalm
19b925e741 use https everywhere (#6574)
* use https everywhere

* use https links on the files that are left

Also, removed some broken links and updated redirections.
2018-08-07 20:42:01 +02:00
Marc Cornellà
8f3737f45b Revert fbcda4d
The PROMPT building method clashes with other themes and
plugins that modify the PROMPT variable.

Also reverted the $jobstates trick due to it not working
inside $PROMPT.
2018-05-23 11:33:34 +02:00
Andrew Baumann
fbcda4d5a9 agnoster: cut down on fork/execs improve performance when not in a repo (#6210)
* agnoster: improve perf with use of $jobstates (zsh/parameter module)

This saves multiple fork/execs (for the subshell and wc) each
time the prompt is rendered

* agnoster: compute git repo_path only when in a git repo

this avoids needlessly invoking git twice every time we render the prompt

* agnoster: avoid subshell when rendering prompt

Rather than forking a subshell to print the prompt, construct it
incrementally by appending to $PROMPT.

v2: fix incorrect CURRENT_BG
v3: fix bzr and hg prompting

Thanks @mcornella for the help.
2018-05-17 14:46:27 +02:00
Dawnflash Lightstring
7e5483d672 Add check for git and bzr to agnoster theme
Plugin command-not-found on Arch Linux returns 0 if git or bzr is found in repos, hence outputting unwanted pkgfile output.
Checking if the commands exist first fixes all such issues.
2016-09-21 12:20:08 +02:00
grindhold
d1ce70f685 added support for bazaar in agnoster theme (#5016)
the agnoster theme is now able to render basic information
if the user is currently residing inside a bazaar folder.
if so, it will render a green promt segment with "bzr" and
the current revision number in it. if there are untracked
files, the bar will be rendered in yellow. if there are
changes to already tracked files, a + character will be
printed.
2016-09-19 20:00:42 -07:00
Anton
a7e30b26ba Fix hg call when missing on archlinux with command-not-found (#5218) 2016-07-22 15:04:35 +02:00
Marc Cornellà
8d6fccef81 Merge pull request #4589 from apjanke/agnoster-powerline-char-stronger-warning
agnoster theme: stronger warning about changing SEGMENT_SEPARATOR character
2015-12-15 02:08:45 +01:00
Justin LeFebvre
76c423862f I noticed that for certain projects with unstaged changed I would get a 'U' character instead of the '●' character. This should fix that. 2015-11-07 20:05:30 -05:00
Andrew Janke
cc116f65d6 agnoster: stronger warning about changing SEGMENT_SEPARATOR character 2015-11-06 19:44:26 -05:00
Robby Russell
51677da85f Merge pull request #4091 from apjanke/agnoster-clarify-powerline
agnoster: Use current Powerline chars everywhere, and clarify behavior
2015-09-19 09:05:57 -07:00
Brian Degenhardt
b875df8970 agnoster: speed up git prompt
Problem

On detached-refs, the git prompt is very slow because it uses a command
to output all refs, which takes 32s on the twitter internal git repo.

Solution

Use git-rev-parse instead of git-show-ref to only output the head ref.
Runtime drops to 0.03 seconds.

Note

Interestingly, git-rev-parse isn't slow without the --head arguement so
I'll probably be cooking up a patch for the git team to speed this up
eventually, but it's still pointless to sigpipe git as it walks the
filesystem.
2015-07-27 14:19:23 -07:00
Andrew Janke
c82deedc97 agnoster: Protect Unicode esape sequences with local LC_* settings 2015-07-03 01:46:34 -04:00
Andrew Janke
4cd281ba1b agnoster: Define Powerline chars with escape sequence, and use same character on
all platforms. Add clarifying comments. This makes everything consistent
with the current Powerline-patched fonts definitions.
2015-06-25 20:13:59 -04:00
Robby Russell
3d2bf227ea Merge pull request #4001 from ivanfoo/fixOddCharsOnMac
Fixed odd chars on mac for agnoster theme
2015-06-14 22:01:07 -07:00
ivanfoo
c6460ef3e7 Fixed odd chars on mac for agnoster theme 2015-06-15 00:25:22 +02:00
Mark Mendoza
a98501d2ce Grep bug in Agnoster 2015-06-10 14:36:52 +02:00
DanielFGray
00ec11d3c0 ignore any grep aliases that might be defined 2014-11-16 02:47:35 -06:00
Marc Cornellà
74177c5320 Change all whoami calls for $USER variable
This avoid spawning additional processes, as the $USER variable will
**always** contain the current logged-in user.
2014-11-06 18:33:56 +01:00
tcasparro
53323abdb1 Added git mode support for merging, rebasing, and bisecting
<B> Designates Bisecting
>M< Designates Merging
>R> Designates Rebasing
2014-03-26 10:37:56 -07:00
mrbfrank
685ea4a361 theme agnoster: remove trailing space
re-implemented expired pull request https://github.com/robbyrussell/oh-my-zsh/pull/1759
2014-01-29 13:35:21 -06:00
mrbfrank
7daaa188da corrected branch character
changed ± to 
2014-01-28 21:54:00 -06:00
mrbfrank
78ffa71cb6 updated url to latest powerline-patched fonts
clearing up some confusion in issue#1906
2014-01-28 18:02:40 -06:00
Eddie Monge
3930a63253 no tabs in a space-d file 2013-11-14 16:17:23 -08:00
Robby Russell
7a7eda1287 Merge pull request #2219 from Profpatsch/theme-agnoster
Forgot one symbol for hg.
2013-11-13 13:28:44 -08:00
Leonardo Santagada
009b906111 agnoster theme not showing virtualenv status
agnoster theme was checking if the default virtualenv prompt was turned off and not showing its own... so there was no way to see which virtualenv was selected.
2013-11-09 13:02:38 -02:00
Profpatsch
5718d2b688 Forgot one symbol for hg. 2013-11-04 23:35:42 +01:00
Robby Russell
042ee6e6ed Merge pull request #2138 from Profpatsch/theme-agnoster
More expressive symbols for git and mercurial.
2013-10-24 20:28:22 -07:00
Jacob Magnusson
0f9db24f9f Fix: Agnoster theme added venv name even if disabled
See http://www.virtualenv.org/en/latest/index.html\?highlight\=virtual_env_disable_prompt\#activate-script for info regarding this.
2013-10-20 16:07:19 +02:00
Profpatsch
fa85b4d6ee More expressive symbols for git and mercurial. 2013-10-02 23:24:21 +02:00
Robby Russell
61e3951e4b Revert "Replace no unicode glyph on hexa string"
This reverts commit baffc3b0bd.
2013-09-19 13:18:16 -07:00
Mr Prud
baffc3b0bd Replace no unicode glyph on hexa string 2013-08-29 14:07:09 +02:00
Gong Hao
ebfc9042ed add virtualenv prompt support for agnoster theme 2013-06-25 12:29:48 +08:00
Grégoire Détrez
97849bd9b6 Update the character used in powerline
The code points have been updated in 53fbfe1, see
- 53fbfe15fe
- https://github.com/Lokaltog/powerline/issues/4
2013-06-06 13:06:29 +02:00
Robby Russell
d6a36b1756 Merge pull request #1575 from mguindin/agnoster-change
[agnoster-theme] modifying theme for dirty/staged files
2013-04-23 20:17:40 -07:00
Yohann Bianchi
5128669a76 IMPROVED: untracked file status has priority over modified (ie: if you have both modified and untracked files, your prompt will be red indicating the presence of untracked files) 2013-03-26 09:57:11 +01:00
Matt Guindin
ef8e3a67f2 [agnoster] modifying theme to show dot for dirty files and plus for staged files in git repos 2013-01-30 20:46:08 -05:00
Yohann Bianchi
28b737416f ADDED: Mercurial prompt info support even if hg prompt extension is unavailable 2013-01-20 13:10:31 +01:00
Yohann Bianchi
8e9cf45200 ADDED: Mercurial repository info 2013-01-19 00:52:09 +01:00