Code Monkey home page Code Monkey logo

geometry's People

Contributors

alxbl avatar castellanprime avatar cnguy avatar coteeq avatar crasx avatar desyncr avatar diogoazevedos avatar duncanbeevers avatar ev-agelos avatar frm avatar frmendes avatar hanslovsky avatar itsxaos avatar jedahan avatar keelan542 avatar kguthrie avatar konsonanz avatar kyounger avatar lurst avatar magejohn avatar marioricalde avatar michcioperz avatar mihaiolteanu avatar olegtarassov avatar plantevodu avatar sephvelut avatar shridharmanvi avatar thomaso-mirodin avatar wuvs avatar zapashcanon 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

geometry's Issues

config option to render the prompt on one line (feature)

Is there any particular reason the prompt always adds an extra line? I was wondering if we could add an option to remove that, I found if I changed

prompt_geometry_render() {
  PROMPT="
 %(?.$GEOMETRY_PROMPT.$GEOMETRY_EXIT_VALUE) %F{$GEOMETRY_COLOR_DIR}%3~%f "

  PROMPT2=" $GEOMETRY_SYMBOL_RPROMPT "
  RPROMPT="$(prompt_geometry_git_info)%{$reset_color%}"
}

to

prompt_geometry_render() {
  PROMPT="%(?.$GEOMETRY_PROMPT.$GEOMETRY_EXIT_VALUE) %F{$GEOMETRY_COLOR_DIR}%3~%f "
  PROMPT2=" $GEOMETRY_SYMBOL_RPROMPT "
  RPROMPT="$(prompt_geometry_git_info)%{$reset_color%}"
}

and i get a single line

image

unless you think this would break anything I'm happy to submit a PR w/ this as a feature/optoin

git_conflicts issue since zplug 2.3.1

Hi,

Updated to zplug 2.3.1, and since then have had lots of issues with zsh, there is also this issue, where the theme is not displayed, but this error keeps appearing:

prompt_geometry_git_conflicts:[:10: integer expression expected: 1\n1

I have an issue posted (here, for some more information)[https://github.com/zplug/zplug/issues/268]

Do you know if this is anything caused on your end, or a symptom of a larger issue?

Zsh theme development processes

A bit offtopic but I'm having trouble with developing for this plugin, since my process currently is just to change the repo dir inside ~/.antigen/repos/, running antigen update and then opening a new terminal and checking if it worked. I'm using an absolute dir path in my ~/.zshrc but antigen update doesn't seem to be tracking changes there. Do you have a better way of doing this?

Spaces before git plugin's branch name

There are a few empty spaces before git branch name. There should be a single space between the plugin outputs (in this case exec_time and git).

screen shot 2016-12-13 at 1 15 29 pm

For anyone interested in their first PR.

Aliased commands may break geometry

As per #59. Aliased commands may break/change geometry inner workings.

Avoid this with a similar approach to zsh-users/zsh-syntax-highlighting#390:

At the top:

# Save aliases into a variable and remove/unalias everything
zsh_highlight__aliases=`alias -L`
builtin unalias -m '*'

At the bottom:

# Restore aliases & kill global variable
eval "$zsh_highlight__aliases"
builtin unset zsh_highlight__aliases

Remove "enabled" flag for plugins

Some plugins, such as docker machine, have an enabled variable. If the plugin is loaded, it should be considered enabled, otherwise the user wouldn't have added it to the plugin list.

It's also not intuitive having to add the plugin to a plugin list and setting an environment variable.

Option to disable RPROMPT

Having RPROMPT when running a subshell in midnight commander produces all kind of weirdness. I used to disable it completely under such condition. All I need is an option in geometry to do so. Probably I can hack it around without changing the geometry, but messing with precmd hooks isn't a sane way to maintain it.

Clarify plugins used in screenshots

Some users may assume that syntax highlighting will be enabled with the theme (command colouring) - at least I got asked once.

So it may be useful to add a note explaining which plugins are used.

AFAIK there is only zsh-users/zsh-syntax-highlighting plugin installed in the screenshots.

Edit: Other thing to add would be the terminal and rupa/z plugin.

`exec_time` built-in plugin keeps on being displayed

The exec_time built-in plugin shows a strange behavior after being displayed once. It may keep being show whether a command is executed or not.

Steps to reproduce:

  • Launch terminal
  • Wait at least 5 seconds
  • Press Enter key

Expected behavior:

  • No exec_time plugin is shown

Shown behavior:

  • exec_time is shown (8s, 9s, etc)

Add section with user submitted plugins

To give visibility and kick start a plugin ecosystem.

Meanwhile most custom plugins are rather too specific for publishing there is still a place for plugins for 'svn', for example.

Thoughts you guys?

Left prompt customization

  • Modify prompt to make use of plugins
  • Be able to configure plugins for rprompt as well as prompt.
  • Evaluate which customization can be added

Errors showing on new session

After updating zplug and my plugins (including geometry) I began receiving the following messages, everytime I start a new session.

$ zsh
Error: Plugin exec_time already registered.
Error: Plugin git already registered.
Error: Plugin hg already registered.

How can this be fixed?

Option to add custom prefix/postfix to PROMPT

I'd like to define my own indicators that will be included in PROMPT. I can easily create a function or variable to return indicator string, but I miss is a proper way to inject it into geometry PROMPT.

branch parse error

I seem ti be getting a parse error when im changing from branch or fetch. This ends up to not showing the branch name in the promt anymore.

_git_branch:4: parse error: condition expected: 1
__gitcomp_nl:compset:5: can only be called from completion function
__gitcomp_nl:compadd:6: can only be called from completion function

msbzj
screen shot 2016-05-23 at 11 17 57

I'm using iTerm on OS X El Capitan v10.11.4

Virtualenv support

Hi @frmendes, I found this theme recently and am loving it, but it's missing Python's virtualenv support, if I send a PR, are you interested in merging such a feature?

Random hostname colouring range

As of now it's not really that much random.

There are a lot of recurrent colors (purple, blue, light blue). Might have to do with my own setup which currently is Base16 Tomorrow Night.

However there seem to be some colors that are missing out, mainly to try and avoid conflicts with the red symbol used when a command has a non-zero exit.

Cannot configure geometry for single line usage

I was looking for a way to configure geometry to a single line prompt, so I tried setting GEOMETRY_PROMPT_PREFIX="" but this does not seem to work. I randombly fell on #102 and specifically on this line. I have very limited zsh knowledge but I guess that this defines GEOMETRY_PROMPT_PREFIX to be $\n if it is not set.

By adding it in a configuration file with an empty setting, I guess it is treated as "not set" so it defaults to a new line.

Is it possible to override this somehow and get a single line prompt?

Lag and high CPU usage on large repositories holding enter-key

On this particular scenario, where the user holds the enter-key and the current directory is a huge repository, geometry (async library, in fact) may consume a lot of CPU and for this reason the prompt may "lag" and seem "slow".

I attribute the high CPU usage to the exec, kill, and re-exec of git subprocesses to print the git built-in plugin.

We could solve this by performing a small cache (1 sec, half a sec) of rprompt. Any other idea? Suggestion?

RFC: Plugin architecture

There are lots of tools that can be added to the prompt, they are useful for some but not generally useful for everyone, naturally. This causes the code to grow large and maintenance becomes a problem. This will become an issue as more prompts are added.

To be able to manage this issue I propose to turn most informative prompts (git, virtualenv, python, etc) into a separate file that can be loaded at runtime. This will keep separate the base prompt from the informative prompts, making maintenance a bit easier. Also performance-wise seems reasonable to keep unloaded unused prompts.

This structure will also provide the ability to create custom -user made- prompts, outside the geometry code base.

Implementation will require to establish a common interface for the prompts (function and variable names) as well as a globally available array to register a given plugins/prompt. Similar to https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md

Thoughts?

Edit: Probably Fixes #24

Async support for git info

It seems like there is a big delay getting the git information, especially for large repositories. There are some small optimizations we can do with git log -1 everywhere but maybe looking at pure and other prompts that use async we can get a pty to render the git portion.

Extra space when disabling git commit time

Recently been using this theme and loving it, this is extremely nit picky, but for such an aesthetic theme it stands out!

If you disable the git time, there's a gap between the spacing where it used to be:

Is it possible to make the spacing consistent? Thanks

`_git_remote_check:5: = not found`

Hi there, I really like this minimal theme. There's just a small annoyance, whenever I cd to a directory with a git repo, it outputs:

_git_remote_check:5: = not found

Add Node/yarn version plugin

Create built-in plugin (in the lines of virtualenv and docker_machine) for node and npm version prompt.

Prompt should look something like:

⬡ v6.9.2 (3.10.9)

npms start up time is quite noticeable so version information should be cached in the setup phrase, in fact, this should be done for node and npm.

This is a great opportunity for anyone interested in contributing.

Add Ruby/rvm version plugin

Similar to #57 create a plugin for ruby/rvm version information prompt.

Use rvm/rbenv if available. Display in the following format:

 ◆ 2.3.3 (1.27.0)

Cache version information in the setup phrase.

This is a great opportunity for anyone interested in contributing.

Git prompt issues with Prezto

BRACE_CCL option set by prezto's environment module causes:

Fatal error ambiguous argument @u

By removing { and } from the commands.

Making geometry look like it is shown in the example images

In the example images, the colors and other configuration options are different from the default configuration geometry has. Is it possible for the exact configuration of the example to be explained somewhere, or at least some of the color choices? It looks awesome.

prompt_geometry_render:1: = not found

I am using zplug to manage my plugins, since the update from #13, I now get this error:

prompt_geometry_render:1: = not found

I have updated, reloaded my terminal, reloaded zsh and as a last resort re-installed geometry.

Any thoughts? I looked through the code but my understanding is very primitive. Thanks

Variables that I am using:

PROMPT_GEOMETRY_GIT_TIME=false
GEOMETRY_COLOR_GIT_DIRTY=9
GEOMETRY_COLOR_GIT_BRANCH=6
GEOMETRY_COLOR_EXIT_VALUE=9
PROMPT_GEOMETRY_GIT_CONFLICTS=true
GEOMETRY_SYMBOL_EXIT_VALUE="▲"

Complete config for custom separator

Update default plugins to make use of GEOMETRY_PLUGIN_SEPARATOR to separate prompt blocks.

Some plugins such as git use a hardcoded string as separator (ex. ::). Review if it's necessary to change it for each plugin or just some of them.

Gracefully handle `--ignore-submodules` flag missing in git 1.7.1 and below

--ignore-submodules flag was introduced in git 1.7.2. If geometry is used with this git version it throws an error:

~/geometry error: unknown option `ignore-submodules'
usage: git status [options] [--] <filepattern>...

    -v, --verbose         be verbose
    -s, --short           show status concisely
    --porcelain           show porcelain output format
    -z, --null            terminate entries with NUL
    -u, --untracked-files[=<mode>]
                          show untracked files, optional modes: all, normal, no. (Default: all)

This is almost a non-issue as git 1.7.1 was released in 2010, but I stumbled with this issue on a CentOS 6 machine.

prompt_geometry_set_cmd_title: backticks and $() get evaluated twice

Over at oh-my-zsh we just confirmed the geometry theme to be responsible for the double evaluation of commands within backticks and $():

$ echo echo doh >> doh
$ cat doh
doh
doh

The same happens with $(). mcornella was able to trace it to:

prompt_geometry_set_cmd_title () {
prompt_geometry_print_title "${2} @ %m"
}

When I set that function to {}, the problem disappears.

Tab completion problem

I am having a problem using this theme when I try to tab complete

so it's like
▲ .oh-my-zsh/custom/themes ls
and after tab completion it becomes
▲ .oh-my-zsh/custom/themesls

I tried to modify the theme but failed. Really can't figure out where the problem is

Set title doesn't work as expected

When executing a long-running command the terminal title is set to "$COMMAND @ $CURR_DIR". Should it be the running command.

screen shot 2016-12-01 at 6 02 19 pm

Should be an easy fix for anybody interested in contributing.

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.