Giter Site home page Giter Site logo

pure-fish / pure Goto Github PK

View Code? Open in Web Editor NEW
1.2K 9.0 131.0 2.15 MB

Pretty, minimal, and fast prompt for Fish shell inspired by sindresorhus/pure

Home Page: https://pure-fish.github.io/pure/

License: MIT License

Shell 95.70% Dockerfile 2.05% Makefile 2.13% Nix 0.13%
fish fish-prompt prompt shell fish-plugin pure fisher

pure's Introduction

Pure.fish logo

ci-status fish-3 release-version sponsors

Pure ❯❮❯

Pretty, minimal and fast Fish 🐟 prompt, ported from zsh.

Pure with dark colorscheme Pure with light colorscheme

Documentation

✨ Check-out our brand-new documentation for configurations, features and colours as well as contributing guide.

🚀 Install

⚠️ requirements: fish ≥3.x, fisher:

fisher install pure-fish/pure

Features

Fully customizable (colors, symbols and features):

🏴 means it's controlled by a feature flag, 🛠 mean it's configurable.

Configuration

See How to configure pure prompt?

Features' Flags

See Features and their respective options.

❤️ Contribute

If you have any ideas or suggestions, we encourage you to submit a pull request. Our team will review and discuss your contribution.

Checkout our Contribution Guide to get familiar with our conventions and requirements.

👨‍💻 People

MIT License

Ports

pure's People

Contributors

asheboy avatar bdarcus avatar benedictleejh avatar bobsoppe avatar boyeborg avatar codesections avatar edouard-lopez avatar faho avatar fulopkovacs avatar gpanders avatar hyperupcall avatar jorgebucaran avatar kwigley avatar m15a avatar mattmc3 avatar mortnod avatar mwilliammyers avatar novadev94 avatar oranja avatar orf avatar pierrebeaucamp avatar ponko2 avatar rafaelrinaldi avatar saikocat avatar shougo avatar smh avatar sodisdocs avatar speyejack avatar spthm avatar tonylegrone 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

pure's Issues

v2.0.0

I think we're almost good to go on a v2.0.0 release.

Current checklist:

  • Vim mode support
  • Cleanup Travis configuration
  • Async support (see #56) postponed
  • Better color customization options (see #69, #70)
  • Add tests for #63 (git status and git branch functions) and #96
  • ⚠️ naming convention to harmonize configuration's variables (see #130) this is a breaking change!

I'd love to hear your thoughts on what we have right now and would also appreciate if someone can help with the pending items.

Hope you guys are doing well!

Question about releases

We haven't published any releases so far so I was wondering if it makes sense to do at this point. If so, what version should we release? v1.0.0 or v0.1.0?

Also, I'm not sure how frameworks like OMF and Fisherman handle package releases (user being able to install an specific version a package).

Thoughts?

Line breaks break the line

Hello! Here's the bug I mentioned on Twitter.

  1. I just installed pure via curl
  2. I pasted the curl command again
  3. I pressed the left arrow key multiple times to go back to the first line
  4. I only pressed .

timeupdate

Notice how an extra f pops out :(

I'd like to know if it's just me or of it's pure.fish

Also for some reason, Pure doesn't persist. A new window will go back to the old style

Error test: Missing argument at index 2 with virtualfish

After installing virtualfish and customizing my fish_prompt as shown in the documentation with my omf theme pure I got error:

test: Missing argument at index 2

I tried with another theme (flash) and got event more error.

steps

I edited the fish_prompt as follow:

funced fish_prompt
# add lines, then save and quit vim
funcsave fish_prompt
# Ctrl+D to quit tmux tab
# open new tab, get the error

Question

How can I solve this issue?

See also

Vim Indicator

Is there any way to integrate the native fish_vim_prompt into the pure prompt?

Working Directory not printed on first run

I looked in the code, and it seems that the current working directory is printed on top for the prompt everytime, unless if it's the first time fish is invoked.
Is there a way to change this behavior?

Also, I noticed that when I clear the screen, the prompt is on the third line. First line is empty, second line is the working directory. Any chance this empty line can also be removed?

Cheers

Make it persistent

I tried installing it via curl and via fisher, but pure is only applied in the current session, it doesn't persist across tabs/windows/sessions.

How do I set it up?

Broken after fish update?

Just updated fish to 2.5.0 today and it seems like prompt is broken (yup, it's me again!). This is what I get:

test returned eval errors:
        invalid integer ''
test returned eval errors:
        invalid integer ''
~ 
❯ 

Anyone else experiencing the same issue?

Fisher update fails

I tried to update using

$ fisher update pure

And got:

Updating >> pure
fish: Unknown command '__fisher_path_update /home/elopez/.config/fisherman/cache/pure'
fish: ;__fisher_path_update /home/elopez/.config/fisherman/cache/pure
       ^
No plugins were updated.

@bucaran Should we add a __fisher_path_update function that alias to our installer.fish install_pure function?

Username and host not displayed when in an SSH session

As per the title, the username and host is not displayed when in an SSH session. Just to be sure, I've tried looking through the code, and couldn't find any location where the SSH session is being tested for, and the username and host being displayed.

Issue with `__parse_current_folder`

I just did a fresh install and after opening a new Terminal tab I started getting this error:

fish: Unknown command '__parse_current_folder'
~/.config/fish/functions/fish_prompt.fish (line 1): __parse_current_folder
                                                    ^
in command substitution
    called on line 28 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
    called on standard input

in command substitution
    called on standard input

Ping @edouard-lopez

Missing argument while setting threshold in __format_time.fish

I just updated pure using oh-my-fish and I'm getting the following error every time I open a new shell.

Array index out of bounds
~/.local/share/omf/themes/pure/__format_time.fish (line 7):   set -l threshold $argv[2]
                                                                                     ^
in function '__format_time'
        called on line 41 of file ~/.config/fish/functions/fish_prompt.fish
        with parameter list '5'

in command substitution
        called on line 39 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
        called on standard input

in command substitution
        called on standard input

test: Missing argument at index 2

Result of omf doctor:

❯ omf doctor
Oh My Fish version:   5
OS type:              Darwin
Fish version:         fish, version 2.4.0
Git version:          git version 2.12.0
Git core.autocrlf:    no
Your shell is ready to swim.

Any advice on what might be wrong? Thanks in advance.

Reset colors

I have played around a bit with the fish_config web interface and realized that now my colors are a bit off - what's the best way to revert the changes? I tried grepping and unsetting the values I found in set -U but that left me without any colors on input, even after reinstalling this theme. Any advice?

Versionning

@pierrebeaucamp @rafaelrinaldi I pushed some tags on the recent merges and feature additions loosely following semver.

So we are now on version 1.6.0 🎉 !

Please consider tagging the project for upcoming feature additions :)

Tests

Starting this issue to discuss best approaches to test fish code.

Some of the things I would love to test:

  • Prompt features (symbols, order of how things are rendered, etc)
  • Git integration (dirty branches, active branch, etc)
  • Prompt consistency across different OS
  • Speed (new implementation vs. "production" one, make sure there's no regressions were introduced)

Would love to hear from everybody, specially amazing people who have contributed to this project before @edouard-lopez, @oranja and @Shougo.

Broken prompt

After introducing the prompt customizations on our last release, I think we might have broken something. Just did a fresh install on a new computer via both the default installer script and Oh My Fish and I the prompt is not displaying symbols.

See the screenshot:
screen shot 2017-01-17 at 10 34 07 pm

  • No arrow symbol indicating user input
  • No Git hints whatsoever
  • No cwd hints
  • Colors look different from previous defaults

Can anyone confirm/help? @Shougo @edouard-lopez

Terminal emulator and theme

Hi there,

Would you mind telling us which is that beautiful terminal emulator (and theme) from the README.md?

Thanks!
GV

[bug] fatal error when entering a git repository with a detached HEAD

Usually I report a bug with a PR to fix it, but I've spent all my coding fun time for today, so I will leave it here for now. Perhaps I will pick it up again when I get a chance.
In the meantime even reproducing the error and reporting it here will be helpful.

I'm testing a few things in OMF, so currently I'm working on a detached HEAD in $OMF_PATH.
When cding into this folder, I get the following error:

❯ j omf
/home/oranja/.local/share/omf
fatal: ref HEAD is not a symbolic ref

My first guess is that it's coming from __parse_git_branch.fish.

Commands finish but with errors

I am running the newest versions of fish, omf, etc. This example is with the command clear

Note: This only happens on this theme

Details:

No command 'string' found, did you mean:
Command 'spring' from package 'spring' (universe)
Command 'spring' from package 'ruby-spring' (universe)
Command 'strings' from package 'binutils' (main)
Command 'strings' from package 'binutils-multiarch' (main)
string: command not found
/.local/share/omf/themes/pure/__parse_current_folder.fish (line 1): string replace $HOME '' $PWD
^
in function “__parse_current_folder”
called on line 3 of file ~/.local/share/omf/themes/pure/fish_title.fish

in command substitution
called on line 1 of file ~/.local/share/omf/themes/pure/fish_title.fish

in function “fish_title”
called on standard input
with parameter list “clear”

in command substitution
called on standard input

No command 'string' found, did you mean:
Command 'strings' from package 'binutils-multiarch' (main)
Command 'strings' from package 'binutils' (main)
Command 'spring' from package 'spring' (universe)
Command 'spring' from package 'ruby-spring' (universe)
string: command not found
/.local/share/omf/themes/pure/__parse_current_folder.fish (line 1): string replace $HOME '' $PWD
^
in function “__parse_current_folder”
called on line 44 of file ~/.config/fish/functions/fish_prompt.fish

in command substitution
called on line 42 of file ~/.config/fish/functions/fish_prompt.fish

in function “pre_prompt”
called on standard input

in event handler: handler for generic event “fish_prompt”

No command 'string' found, did you mean:
Command 'strings' from package 'binutils' (main)
Command 'strings' from package 'binutils-multiarch' (main)
Command 'spring' from package 'spring' (universe)
Command 'spring' from package 'ruby-spring' (universe)
string: command not found
~/.local/share/omf/themes/pure/fish_title.fish (line 1): string replace -r '^.*/' '' -- $PWD
^
in command substitution
called on line 1 of file ~/.local/share/omf/themes/pure/fish_title.fish

in function “fish_title”
called on standard input

in command substitution
called on standard input

No command 'string' found, did you mean:
Command 'spring' from package 'ruby-spring' (universe)
Command 'spring' from package 'spring' (universe)
Command 'strings' from package 'binutils' (main)
Command 'strings' from package 'binutils-multiarch' (main)
string: command not found
/.local/share/omf/themes/pure/__parse_current_folder.fish (line 1): string replace $HOME '' $PWD
^
in function “__parse_current_folder”
called on line 3 of file ~/.local/share/omf/themes/pure/fish_title.fish

in command substitution
called on line 1 of file ~/.local/share/omf/themes/pure/fish_title.fish

in function “fish_title”
called on standard input

in command substitution
called on standard input

Remove Oh My Fish! framework badge

This theme works perfectly with:

and of course

Displaying the Oh My Fish! badge could potentially make new users believe that this theme does not work with others systems.

BTW I know the README was generated from a template that includes this badge (or the badges were taken from a template), as I worked in the original ones for Wahoo and also for OMF. I am just posting this to let you know of the issue.

Cheers! 😄

Can't report window title on Terminal.app

For some reason, when I use Terminal.app instead of iTerm2, pure don't report the title the way it's supposed to.

What comes to mind:

  • Has to do with $TERM
  • Problem with fish itself

Update first line on "Alt + ←" and "Alt + →"

related: #68


Fish allows user to go back and forth in directory history with Alt + ← and Alt + →. Pure should update first line of the prompt containing current directory after changing it using those key combinations.

Right now, the directory on the first line updates to proper value only on the next prompt. Built-in prompts seem to update directory without any issues.

Sent with GitHawk

Display virtualenv in prompt

Hi! I've just started using pure, and I'm really liking it so far. The only thing I'm missing, is having my virtualenv show up in my prompt if sourced. Is it possible for me to extend my prompt, so that the name of the virtualenv is added?

test returned eval errors

Hi there,

This is an issue that started surfacing after I've upgraded to the latest version (2.5) of fish. I'm using fisher.sh to manage the fish plugins.

My guts tell me that there's an issue in the fish.prompt code but I'm not a fish expert. This happens every time I run a command:

test returned eval errors

screen shot 2017-02-07 at 10 27 39

Given that fish does not have a debug mode yet (like bash) I was unable to quickly figure out what actually happens, I'm afraid.

I was also thinking whether this was a regression in fish itself and found this bug:
fish-shell/fish-shell#3753

Having updated to fish HEAD (g162053ed) I was hoping this issue will be sorted but it seems to be outstanding.

Any help would be greatly appreciated, thank you.

PS: I'm on mac OS 10.12.3 (16D32) and am using the built-in Terminal.app

Add option to customize theme

Since we already use variables everywhere, it should be as simple as changing them from local to the global scope.

Move installer.fish to bin or tools directory

Hello, @edouard-lopez @rafaelrinaldi. I'm preparing fisher's V3 release and noticed that fisher was copying an installer.fish file to my installation prefix functions directory. When installing a package, fisher will move fish files inside functions/ and in the top-level directory of the project to your prefix functions directory (in that order).

I suggest putting installer.fish inside a tools/ or bin/ directory, but another location could work—it's up to you. I'd happily send you a PR, but I'm not too familiar with pure's manual installation instructions and all the other files in the repository.


Ideally, people would not put fish files in the top-level directory (and always use functions/), but that ship has already sailed and now it's too late to tell everyone not to do it. 😄

Names of user and host in tab are ???

I use fish and pure theme in my mac.
When I use ssh, the names of user and host are properly showed at the end of prompt.
But the names in tab prompt in my terminal of mac are showed as ???.
How can I solve it?

Manual installation throws error on Mac

Manual installation throws error:
https://github.com/rafaelrinaldi/pure#manually

fish: Unknown command '__parse_current_folder'
~/.config/fish/functions/fish_prompt.fish (line 1): __parse_current_folder
                                                    ^
in command substitution
    called on line 29 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
    called on standard input

in command substitution
    called on standard input

Rendering errors with emojis

I'm not quite sure whether the source of this bug lies in this theme, but when I use emojis there is double rendering of text sometimes. A screenshot might clarify what I mean:

screen shot 2017-11-30 at 14 59 56

The same does not happen with regular characters. The screenshot is of me typing gc -am 'Make with the autosuggestion being from an earliert commit message. I'm on macOS 10.13, Terminal.app Version 2.8 (400), Fira Mono 12pt, fish version 2.6.0.

Git async

First I want to thanks you for this prompt, it looks really nice.
But I have one issue when working on very slow hard drive, the shell freezes when entering a new directory (when pure tries to fetch git informations). Do you think it would be possible to retrieve git information asynchronously like the original pure does ?

I have no knowledge on how prompt works, so feel free to close this issue if this change requires a tons of work ;)

Prompt disappears when entering some folders

I know this is really vague, but I'd love some help on debugging this: The prompt looks very different when entering some folders. A screenshot might show better what I mean:

screen shot 2017-07-04 at 17 27 01

The folder contains a git repository, but that alone should not be the reason. I have other git repos that work just fine. I am using fish version 2.6. I am on macOS 10.12.1. If there is any other info I can help with, I'll happily provide it. Thanks in advance!

Array index out of bounds

Installing pure via fundle on macOS 10.12.4 works as expected. Installing it the same way on a FreeBSD 11 machine does not:

 fish -v
fish, version 2.5.0
test: Missing argument at index 2
test: Missing argument at index 2
Array index out of bounds
~/.config/fish/fundle/rafaelrinaldi/pure/__format_time.fish (line 7):   set -l threshold $argv[2]
                                                                                               ^
in function “__format_time”
	called on line 41 of file ~/.config/fish/fundle/rafaelrinaldi/pure/fish_prompt.fish
	with parameter list “5”

in command substitution
	called on line 39 of file ~/.config/fish/fundle/rafaelrinaldi/pure/fish_prompt.fish

in function “fish_prompt”
	called on standard input

in command substitution
	called on standard input

test: Missing argument at index 2

Also note the missing .

This seems to be similar to #47 but I'm already using the latest master of pure and fish 2.5.0, it appears the issue is not fully resolved yet.

Remove `dist: xenial` option from travis config

The dist: xenial option is currently only added for experimental reasons, and will not work reliably (see this issue, and this comment).

I don't think it is needed, thus suggest just removing it from the travis configuration.

An example of how unreliable this is, see build #7 and build #8. They both consist of the exact same content, the only difference being the SHA in the last commit, yet the first fails and the second passes. If you look at the first one, you can see that it actually fails due to timeout before the travis build script has created the environment on which to run the tests.

Always print CMD_DURATION

Is there a configuration that make pure to echo CMD_DURATION no matter what the ret code is? How can I modify the time threshold?

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.