Giter VIP home page Giter VIP logo

alien-minimal's Introduction

Indrajits's github stats

Top Langs

alien-minimal's People

Contributors

bric3 avatar eendroroy avatar gareys avatar gitter-badger avatar j0ng4b avatar jkhsjdhjs avatar jonatan-ivanov avatar louis-vinchon avatar neyaoz 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

alien-minimal's Issues

Vi Prompt does not work

  • I'm submitting a ...

    • bug report
    • feature request
    • support request
  • Do you want to request a feature or report a bug?
    Report a Bug

  • What is the current behavior?
    Vi indicator does not update as intended.

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
    Simply enable Vi mode and toggle between insert mode and normal mode.

  • What is the expected behavior?
    That the indicator update properly.

  • What is the motivation / use case for changing the behavior?
    Expanding our prompt to support vi mode users.

  • Please tell us about your environment:

  • Plugin Manager: zplug
  • ZSH Version: 5.7.1
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, etc)
    I believe I know why this is happening...

zle-line-init() and zle-keymap-select() both trigger a method which updates AM_VI_MODE_IND. We then trigger a reset-prompt which will cause the prompt to "re-render".

I believe the issue with the Vi indicator is that this reset prompt doesn't trigger all of our other methods, rather it just uses the current RPROMPT again. For this reason, I believe we need to change echo -ne "${AM_VI_MODE_IND}" to echo -ne '${AM_VI_MODE_IND}.

This way, your RPROMPT variable will be

%F{8}[%f%F{2}PY:2.7.10%f%F{8}|%f%F{1}RB:2.3.7%f%F{8}|%f%F{2}⬡ 10.16.3%f%F{8}]%f %F{1}G:%f%B%F{10}min%f%b %F{6}[4D]%f %F{14}227998f%f %F{1}⭑%f ${AM_VI_MODE_IND}

instead of

%F{8}[%f%F{2}PY:2.7.10%f%F{8}|%f%F{1}RB:2.3.7%f%F{8}|%f%F{2}⬡ 10.16.3%f%F{8}]%f %F{1}G:%f%B%F{10}min%f%b %F{6}[4D]%f %F{14}227998f%f %F{1}⭑%f

This, I believe, is what allows the Vi indicator to work properly 😉

Newline after prompt

  • I'm submitting a ...
    feature request

  • Do you want to request a feature or report a bug?
    feature

  • What is the current behavior?
    prompt and command output don't have a blank line in between them

  • What is the expected behavior?
    have it show a blank line, like it does in the non-minimal alien

  • What is the motivation / use case for changing the behavior?
    I feel it would look cleaner

  • Please tell us about your environment:

  • Plugin Manager: zplugin
  • ZSH Version 5.5.1

rprompt do not appear

  • I'm submitting a ...

    • bug report
    • feature request
    • support request
  • Do you want to request a feature or report a bug?
    bug

  • What is the current behavior?
    right prompt is never show on a specific machine

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
    Use my dotfiles https://gitlab.com/gnumoksha/dotfiles

  • What is the expected behavior?
    alien-minimal show a right prompt

  • What is the motivation / use case for changing the behavior?
    none

  • Please tell us about your environment:

  • Plugin Manager: [antigen | zplug | oh-my-zsh | ... ] none
  • ZSH Version: zsh 5.7.1 (x86_64-debian-linux-gnu)
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, etc)

Prompt is printing all environment variables

  • I'm submitting a ...

    • [X ] bug report
    • feature request
    • support request
  • Do you want to request a feature or report a bug?
    Report a bug

  • What is the current behavior?
    When I installed this today on a new system using Antigen, it is outputting all environment variables in the prompt. I see that the theme was updated yesterday. Possibly a bug? I even changed to directly using the git repo and it still has the bug.

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

  1. Install Oh My Zsh
  2. Install Antigen
  3. Include in your .zshrc file: antigen theme https://github.com/eendroroy/alien-minimal.git alien-minimal

My prompt looks like this: https://gist.github.com/sibblegp/dc6f656123e0ce1ef6e7d45b63a0bade

  • What is the expected behavior?
    Not to print all environment variables.

  • What is the motivation / use case for changing the behavior?
    Have it work like it usually does.

  • Please tell us about your environment:

  • Plugin Manager: antigen
  • ZSH Version: 5.4.2

Customization limiting "Design flaw"

I'm submitting a ...

  • bug report
  • feature request
  • support request
  • Question / Suggestion / Remark

Maybe I should post it on your library promptlib-zsh instead, more detail on that further down the page.

Context

I am currently implementing some simple features on my fork of the project and I found what I would qualify as a design flaw where the single responsibility principle isn't respected, which makes customization harder:

Most of the prompt parts have customizable colors, symbols, and we can even choose, for some of them, whether or not they should appear. So far so good BUT:

Problem

You are using your helper library promptlib-zsh which handles all the little tasks such as determining versions, git branches, etc...

The issue I encountered in alien-minimal is that I don't have much control over the "branch status" part (colors, icons ...) which is generated by am_git_dirty. Of course we can use the environment variables as specified in the documentation but I, developer, expected to be able to tweak every aspect of my prompt, including separators, just by editing this project's code. The current environment variables do not offer enough options to my taste.

The root of the issue is that plib_git_dirty is responsible for getting the status of the git branche ... but also the formatting, which is where I think it breaks the single responibilty principle. Most of the other function only return raw data, but not plib_git_dirty, it does more than that.

Consequence

What that means for me is that if I want to modify the way branch status is displayed, e.g.

  • Display the number of modified / added / deleted files
  • Have a blank space instead of the symbol if there was no changes (will make the layout more stable visually speaking)

I simply can't do it without ugly, heavy, complicated parsing of plib_git_dirty's returned value (and even then I couldn't get the number of modified files for instance) when it should have just returned data.
I could also fork promptlib-zsh as well, but I would be forking and tweaking two projects for one result because one of the two does a little of both tasks.

Suggested fix

I think the project is well structured and the objective was obviously to have it very modular but this particular implementation is not.

What I suggest is to move everything format-related from plib_git_dirty to alien-minimal. As a "theme plugin" am should handle ALL formatting.

If you agree with these "requested changes" as I would call it, I could make the two PRs. Tbh I'm just done with writing this ... and I just realized I should have coded it in the first place ... because I'll do it anyway.

My environment

  • Plugin Manager: antigen
  • ZSH Version: 5.7.1

lagged response over sshfs

  • I'm submitting a ...

    • bug report
    • feature request
    • support request
  • Do you want to request a feature or report a bug?
    Bug.

  • What is the current behavior?
    Astronomically slow responses.

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
    Simply sshfs mount, change directories into the mount folder, then try running a command like ls (try it about 2 or 3 times) and it will wait about 60 seconds before replying

  • What is the expected behavior?
    To reply almost instantly or relative to its computation time needed.

  • Please tell us about your environment:
    Arch linux x86 Intel, 16GB RAM, 3.1 Ghz

  • Plugin Manager: oh-my-zsh
  • ZSH Version: 5.6.4
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, etc)

RPROMPT expansion and async design

  • I'm submitting a ...

    • bug report
    • feature request
    • support request
  • Do you want to request a feature or report a bug?

This is more along the lines of a support request or a bug report.

  • What is the current behavior?

VIM prompt and VERSIONS prompt are not updating properly.

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

I have AM_ENABLED_VI_PROMPT=1, AM_VERSIONS_PROMPT=(PYTHON RUBY NODE), AM_KEEP_PROMPT=1, and AM_SEGMENT_UPDATE=0. Calling pyenv shell 2.7.15 does not update the python version in the prompt. Hitting <ESC> does not properly indicate the vi mode.

  • What is the expected behavior?

Versions and Vi prompts should update accordingly.

  • What is the motivation / use case for changing the behavior?

Ensuring that users are kept up to date with the latest information.

  • Please tell us about your environment:
  • Plugin Manager: zplug
  • ZSH Version: 5.7.1
  • OSX: 10.14
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, etc)

I've actually been meaning to talk with you specifically about the Vi stuff, but in pulling down a recent update it seems the versions prompt is no longer updating either and if we focus on that I may better understand how to submit a PR for the Vi stuff.

So focusing on version prompts, I think what is happening here is that shells are being expanded too early? But at the same time, I don't want to remove the async design...

zsh's precmd is executed before every prompt. If I insert a echo -n $(pyenv version) here, it always displays the correct and most up to date version.

Inside of precmd, we call am_async_r_prompt. If I insert an echo -n $(pyenv version) here, it always displays the correct and most up to date version.

Inside of am_r_prompt, we call am_r_prompt_complete. This is the tricky thing... if I insert an echo -n $(pyenv version) here, I will always get the version that python was when the shell started. It does not stay up to date. (Almost as if the string is evaluated once at startup and then reused for the remainder of the shell session.)

One easy fix, is to replace the double quotes in am_r_prompt_complete to be single quotes. This fixes version prompts for me but also results in RPROMPT calling functions in I believe a very non-async fashion...

So, what is going on here? I would expect that when I debug printed the python version in am_r_prompt_complete that it would always be up to date. It does not seem to matter if AM_KEEP_PROMPT or AM_SEGMENT_UPDATE is set or not.

(eval):1: bad assignment

Describe the bug
When I enable the theme, zsh starts to throw:

(eval):1: bad assignment

To Reproduce
Steps to reproduce the behavior:

  1. Starts new shell, error shows, before prompt. Will happen also on empty line submit.

Expected behavior
No errors thrown

Environment:

  • Plugin Manager: oh my zsh
  • ZSH Version: zsh 5.8 (x86_64-ubuntu-linux-gnu)
  • Operating System: Windows 10, build 19041.388
  • Terminal Emulator: Windows Terminal, CMD,

Additional context
Not sure what causing it, and no more ideas how to debug. When I used other themes, everything worked. When I switch back to old one, everything works.

I installed the theme with:

git clone --recurse-submodules https://github.com/eendroroy/alien-minimal.git ${ZSH_CUSTOM}/themes/alien-minimal

I cleaned the .zshrc from everything, except:

export ZSH="/home/user/.oh-my-zsh"
ZSH_THEME="alien-minimal/alien-minimal"

source $ZSH/oh-my-zsh.sh

and it still unfortunately happen.

I expect it to be layer 8 problem, i'm just out of ideas how to debug it.

Vim mode indicator

  • I'm submitting a ...
    feature request

  • What is the current behavior?
    There is no way to tell if one is in insert or command mode

  • What is the expected behavior?
    there should be a visible way to tell if i'm inserting commands into the prompt, or editing them in command mode

  • What is the motivation / use case for changing the behavior?
    Having vim mode on the shell is great, especially if you need to edit long commands and things like that, it can make motion fast too.

  • Please tell us about your environment:

  • Plugin Manager: zplugin
  • ZSH Version 5.5.1
  • Other information
    Back when i was using Pure prompt, i had found a solution to this in their wiki where it would allow you to use the prompt character as indicator instead of having to add yet another character to the prompt.
    The code looked like this
VIM_PROMPT=">"
PROMPT='%(?.%B%F{green}.%B%F{red}>%B%F{green})${VIM_PROMPT}%b%f '
prompt_pure_update_vim_prompt() {
	zle || {
	    print "error: pure_update_vim_prompt must be called when zle is active"
	    return 1
	}
	VIM_PROMPT=${${KEYMAP/vicmd/<}/(main|viins)/>}
	zle .reset-prompt
}

function zle-line-init zle-keymap-select {
	prompt_pure_update_vim_prompt
}
export KEYTIMEOUT=1
zle -N zle-line-init
zle -N zle-keymap-select

This way your prompt would look like

> ~ really-long-command-here

in insert mode, and like this

< ~ really-long-command-here

in command mode.
I feel doing it this way would be in keeping with the minimalness of the theme while adding a nice feature.
But of course, i'm not married to this approach or anything like that.

Directory in prompt disappears

Hey, friend. Still loving the theme. I was wondering if you had this issue that I'm having. It may have came about with the variables from my last issue.

The directory portion of my prompt will disappear after x amount of time and will reappear next time I enter a command. I never notice if it is caused by something weird happening with my terminal or if it just randomly switches. I'll attach a screenshot for example.

image

Here's the info that get's loaded from my .zshrc file

PROMPT_START_TAG='→ '
PROMPT_END_TAG=' $'
PROMPT_START_TAG_COLOR=71
PROMPT_END_TAG_COLOR=71

source ~/.oh-my-zsh/antigen.zsh

antigen use oh-my-zsh

...antigen bundle random stuff

antigen bundle https://github.com/eendroroy/alien-minimal.git

antigen apply

It's not a big deal. It's been happening for a while and hasn't disrupted me, just figured I'd post this to see if you had a simple solution! Thanks!

modules not found ...

  • I'm submitting a ...

    • bug report
    • feature request
    • support request
  • Do you want to request a feature or report a bug?

bug

  • What is the current behavior?

when I first start a terminal/item2 I get:

module: 'crystal' not found
module: 'go' not found
module: 'php' not found

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

start terminal/iterm2

  • What is the expected behavior?

not showing:
module: 'crystal' not found
module: 'go' not found
module: 'php' not found

  • What is the motivation / use case for changing the behavior?

n/a

  • Please tell us about your environment:
  • Plugin Manager: [antigen | zplug | oh-my-zsh | ... ] zplugin
  • ZSH Version 5.5.1 (x86_64-apple-darwin17.5.0)
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, etc)

my environment:

export AM_SHOW_PROCESS_TIME=0 # hide
export PROMPT_END_TAG=' §'
#export USE_NERD_FONT=1
export AM_VERSIONS_PROMPT=(RUBY PYTHON)
export AM_SHOW_FULL_DIR=0
export AM_UPDATE_L_PROMPT=0
#export AM_THEME=MONO_BRIGHT
unset AM_THEME

export AM_JAVA_SYM='J:'     # JAVA Version Symbol
export AM_PY_SYM='P:'       # Python Version Symbol
export AM_RB_SYM='R:'       # Ruby Version Symbol
export AM_GIT_SYM=G         # Git Symbol
export AM_HG_SYM=M          # Mercurial Symbol
export AM_SSH_SYM=[S]       # SSH Indicator Symbol
export PLIB_GIT_ADD_SYM=+   # Git New Tracked File Symbol
export PLIB_GIT_DEL_SYM=-   # Git Deleted File Symbol
export PLIB_GIT_MOD_SYM=⭑   # Git Modified File Symbol
export PLIB_GIT_NEW_SYM=?   # Git New Untracked File Symbol
export PLIB_GIT_PUSH_SYM=↑  # Git Unpushed Commit Symbol
export PLIB_GIT_PULL_SYM=↓  # Git New Commit Symbol

Error when git repo has no commits yet

  • I'm submitting a ...

    • bug report
    • feature request
    • support request
  • Do you want to request a feature or report a bug?

  • What is the current behavior?

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
    go to a git repo with no commit

fatal: your current branch 'master' does not have any commits yet
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
  • What is the expected behavior?
    There should be no error.

  • What is the motivation / use case for changing the behavior?

  • Please tell us about your environment:

  • Plugin Manager: [antigen | zplug | oh-my-zsh | ... ] antigen
  • ZSH Version 5
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, etc)

Async background update of prompt

Is your feature request related to a problem? Please describe.
If I have 2 terminal windows opened and in the same git folder, If I switch to different branch in one, the other one does not auto update in the background, still showing the previous branch.

Describe the solution you'd like
It would be good if the prompt could be updated in background, so if I have 2 windows with terminal in the same git repo, and I change branch in one, the other would refresh itself showing new branch. This would also be useful when you switch branch in some other software, like vscode.

wrong node version

Describe the bug
Using oh my zsh nvm plugin, nvm and alien-minimal.

To Reproduce
Steps to reproduce the behavior:

 ~ (i) export AM_VERSIONS_PROMPT=(NODE NODE_S)                                


 [⬡ 11.15.0|⬡ 11.15] 
 ~ (i) nvm use 9
Now using node v9.11.2 (npm v5.6.0)

 [⬡ 11.15.0|⬡ 11.15] 
 ~ (i) 

Expected behavior
I expect the right node version.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment:

  • Plugin Manager: [ antibody ]
  • ZSH Version: 5.4.2 or 5.3
  • Operating System: Ubuntu 18.04 or Mac OS X
  • Terminal Emulator: Tilix 1.7.7 or iTerm 3.0

Additional context
When launching echo -ne "%F{$AM_NODE_COLOR}${AM_NODE_SYM}$(plib_node_version)%f" I got the right result

option to change color of PROMPT_START_TAG depending on exit code

As the title says, an option to color the start tag red if the exit code is not null and blue else, leaving the current directory color unchanged, would be nice.

Also I'd like to have an option to show the full path instead of only the directory between start and end tag.

How to add some characters to prompt

I love the theme :) super simple, just what I wanted.

I was trying to mess with it a little to add an arrow and a dollar sign(I know, making it less simple which I just said I wanted ¯_(ツ)_/¯)

Basically I want it to be → my-dir $ some-command instead of my-dir some-command

The problem is when I add characters to the prompt the alignment gets all messed up. Any tips on how to do this from a fork of your repo?

Thanks!

UX Improve: show previous prompt while waiting for async task

  • I'm submitting a ...

    • bug report
    • feature request
    • support request
  • Do you want to request a feature or report a bug?

  • What is the current behavior?
    whenever I hit Enter, the right prompt disappear while waiting for the async update

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

  • What is the expected behavior?
    it should show the previous status while waiting for git status update. when the new status available, it could replace the old one.

  • What is the motivation / use case for changing the behavior?
    Better UX

  • Please tell us about your environment:

  • Plugin Manager: [antigen | zplug | oh-my-zsh | ... ]
  • ZSH Version
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, etc)

Not able to replicate the shell

Describe the bug

So I followed the installation steps and created the ~/.amrc file however the shell is not adapting the theme

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.