Giter Site home page Giter Site logo

matchai / spacefish Goto Github PK

View Code? Open in Web Editor NEW
963.0 14.0 77.0 5.4 MB

๐Ÿš€๐ŸŸ The fish shell prompt for astronauts

Home Page: https://spacefish.matchai.dev

License: MIT License

Shell 100.00%
fish fish-shell oh-my-fish fish-theme spaceship fish-plugin oh-my-fish-plugin omf-theme spacefish fisher

spacefish's Introduction

Focus has shifted to the development of Starship, the successor to Spacefish. If you are interested in contributing or using it, come take a look!

spacefish fish shell theme

Spacefish ๐Ÿš€๐ŸŸ

Fish Shell prompt for Astronauts.

Mac OSX & Linux CI Status Fish Version GitHub License

Built with โค๏ธŽ by Matan Kushner and contributors
A port of Spaceship ZSH by Denys Dovhan

Spacefish is a minimalistic, powerful and extremely customizable Fish Shell prompt. It combines everything you may need for convenient work, without unnecessary complications, like a real spacefish.

Spaceship with Hyper and One Dark

Vist Troubleshooting for instructions to recreate this terminal setup.

Features

  • Clever hostname and username displaying.
  • Indicator if user is root.
  • Prompt character turns red if the last command exits with non-zero code.
  • Current Git branch and rich repo status:
    • ? โ€” untracked changes;
    • + โ€” uncommitted changes in the index;
    • ! โ€” unstaged changes;
    • ยป โ€” renamed files;
    • โœ˜ โ€” deleted files;
    • $ โ€” stashed changes;
    • = โ€” unmerged changes;
    • โ‡ก โ€” ahead of remote branch;
    • โ‡ฃ โ€” behind of remote branch;
    • โ‡• โ€” diverged changes.
  • Indicator for jobs in the background (โœฆ).
  • Current Node.js version, through nvm/nodenv/n (โฌข).
  • Current Docker version and connected machine (๐Ÿณ).
  • Current Ruby version, through rvm/rbenv/chruby/asdf (๐Ÿ’Ž).
  • Current Go version (๐Ÿน).
  • Current PHP version (๐Ÿ˜).
  • Current Rust version (๐—ฅ).
  • Current version of Haskell GHC Compiler, defined in stack.yaml file (ฮป).
  • Current Julia version (เฎƒ).
  • Current Amazon Web Services (AWS) profile (โ˜๏ธ) (Using named profiles).
  • Current Python virtualenv.
  • Current Conda version (๐Ÿ…’).
  • Current Elixir Version (๐Ÿ’ง).
  • Current Python pyenv (๐Ÿ).
  • Current .NET SDK version, through dotnet-cli (.NET).
  • Current Kubectl context (โ˜ธ๏ธ).
  • Package version, if there is a package in current directory (๐Ÿ“ฆ).
  • Current battery level and status:
    • โ‡ก - charging;
    • โ‡ฃ - discharging;
    • โ€ข - fully charged.
  • Current Vi-mode mode.
  • Optional exit-code of last command.
  • Optional time stamps 12/24hr in format.
  • Execution time of the last command if it exceeds 5 seconds.

Want more features? Please open an issue or send pull request!

Requirements

To get spacefish working correctly, you will need:

Installation

$ fisher install matchai/spacefish
$ omf install spacefish

Customization

Spacefish works really well out of the box, but you can customize your fish to your heart's content!

  • Options โ€” Tweak section's behavior with tons of options.

You have the ability to customize or disable specific elements of Spacefish. All options must be overridden in your config.fish.

Troubleshooting

Having issues? Take a look at our Troubleshooting page.

Still struggling? Please file an issue, describe your problem, and we will gladly help you.

Contributors

Thanks goes to these wonderful people (emoji key):

Matan Kushner
Matan Kushner

๐Ÿ› ๐Ÿ’ป ๐Ÿ“– ๐Ÿ‘€ โš ๏ธ ๐Ÿ”ง ๐ŸŽจ
Tiffany Le-Nguyen
Tiffany Le-Nguyen

๐Ÿ› ๐Ÿ’ป ๐Ÿ“– ๐Ÿ‘€ โš ๏ธ
Snuggle
Snuggle

๐Ÿ› ๐Ÿ’ป ๐Ÿ“– ๐Ÿ‘€ โš ๏ธ
Jaskaran Bindra
Jaskaran Bindra

๐Ÿ’ป ๐Ÿ“– โš ๏ธ
Konstantin Labun
Konstantin Labun

๐Ÿ’ป ๐Ÿ“– โš ๏ธ
Kyle Holzinger
Kyle Holzinger

๐Ÿ’ป ๐Ÿ“–
Salmanul Farzy
Salmanul Farzy

๐Ÿ’ป ๐Ÿ‘€
owais
owais

๐Ÿ’ป ๐Ÿ“– โš ๏ธ
Samantha Enders
Samantha Enders

๐Ÿ’ป ๐Ÿ“– โš ๏ธ
Evan Relf
Evan Relf

๐Ÿ’ป ๐Ÿ“–
Jason Etcovitch
Jason Etcovitch

๐Ÿ’ป ๐Ÿ“–
hrvoj3e
hrvoj3e

๐Ÿ› ๐Ÿ’ป
Michael Newman
Michael Newman

๐Ÿ› ๐Ÿ’ป ๐Ÿ“– โš ๏ธ
Konrad
Konrad

๐Ÿ›
Will Neville
Will Neville

๐Ÿ›
Daniel Trautmann
Daniel Trautmann

๐Ÿ’ป
Jonas ร–hlander
Jonas ร–hlander

๐Ÿ›
lindsay
lindsay

๐Ÿ“–
Brad
Brad

๐Ÿ’ป
Nam Nguyen
Nam Nguyen

๐Ÿ’ป
Austin Ziegler
Austin Ziegler

๐Ÿ‘€
Konstantinos Koukopoulos
Konstantinos Koukopoulos

๐Ÿ’ป โš ๏ธ

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT ยฉ Matan Kushner

spacefish's People

Contributors

allcontributors[bot] avatar avegancafe avatar bradcypert avatar evanrelf avatar hrvoj3e avatar jasonetco avatar jskrnbindra avatar jul1u5 avatar k-lyda avatar kouk avatar kulabun avatar ladysamantha avatar lynzt avatar marlomgirardi avatar matchai avatar matiasjrossi avatar menturan avatar mrdevx avatar nammn avatar newmaniese avatar owais avatar salmanulfarzy avatar semantic-release-bot avatar snuggle avatar tiffafoo avatar willnevillain avatar yjpark 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  avatar  avatar  avatar  avatar  avatar

spacefish's Issues

Let's Label the Stars! ๐ŸŒ ๐Ÿท๏ธ

Feature Request

Is your feature request related to a problem? Please describe.
The current set of labels in this repository are just the standard, generic ones supplied by GitHub. They're no fun! Many of the labels can overlap somewhat and they can be a little confusing.

Describe the solution you'd like
Would it be possible to port the labels that upstream uses, since they appear to be much more detailed and specific? ๐Ÿ™‚

I also believe it would be a good idea to keep a label called upstream-issue, for any issues that we're waiting on Spaceship to chart course before we fire the rockets and implement ourselves. ๐ŸŒ ๐Ÿš€

image

Battery section: ACPI use only first battery value

It appears this issue would also happen on spacefish, and the solution seems like a rather quick fix. ๐Ÿ‘

๐ŸŸ spacefish-bot โ€” Pull request copied from: spaceship-prompt/spaceship-prompt#583.

When trying to show battery percentage with ACPI command having with multiple batteries causes bad math expression.

Fixes spaceship-prompt/spaceship-prompt#245

For the output of:

$ acpi -b 
Battery 0: Unknown, 97%
Battery 1: Unknown, 98%

Original logic:

$ acpi -b 2>/dev/null | awk '{print $4}' | tr -d '%[,;]'
97
98

After piping acpi -b through head -1:

$ acpi -b 2>/dev/null | head -1 | awk '{print $4}' | tr -d '%[,;]'
97

Implement a prompt section for Docker version (๐Ÿณ)

Feature Request

Is your feature request related to a problem? Please describe.
This feature is intended to achieve feature parity with the following Spaceship section file: https://github.com/denysdovhan/spaceship-prompt/blob/master/sections/docker.zsh

Describe the solution you'd like
Porting over the existing zsh implementation of the Docker section file, showing the current Docker version and machine name when the prompt is in the same directory as a Dockerfile, docker-compose.yml or a compose file.

Dropping pyenv in favor of python section

Looks like we've got a bit of updating to do for the pyenv section.
This would also be a great opportunity to add testing where we don't have any at the moment. ๐Ÿ˜„

๐ŸŸ spacefish-bot โ€” Pull request copied from: spaceship-prompt/spaceship-prompt#431.

Description

Dropping pyenv section in favor of python section, python section has three display modes.

Variable Value Meaning
SPACESHIP_PYTHON_SHOW always Always display python version information if relevant files exist in directory
SPACESHIP_PYTHON_SHOW true (default) Display python version only inside virtual environment if relevant files exist
SPACESHIP_PYTHON_SHOW false Don't display python version in prompt

Screenshot

python version inside virtualenv

Tasks

  • Update docs
  • Backward compatibility

Related spaceship-prompt/spaceship-prompt#394
Close spaceship-prompt/spaceship-prompt#410

Implement a prompt section for Kubectl version (โ˜ธ๏ธ)

Feature Request

Is your feature request related to a problem? Please describe.
This feature is intended to achieve feature parity with the following Spaceship section file: https://github.com/denysdovhan/spaceship-prompt/blob/master/sections/kubecontext.zsh

Describe the solution you'd like
Porting over the existing zsh implementation of the kubectl section file, showing the current kubectl version when there is a kubernetes context.

Markdown files have broken links in docs

Bug Report

Current Behavior
Majority of the hyperlinks in docs/README.md are broken.
Clicking on broken links redirects to GitHub 404 page.

Expected Behavior
Every link should redirect to a valid resource.

Possible Solution
Correcting the urls in the Markdown files should fix this issue.

Additional context/Screenshots
screen shot 2018-10-18 at 20 06 51

Implement a prompt section for Vi mode

Feature Request

Is your feature request related to a problem? Please describe.
This feature is intended to achieve feature parity with the following Spaceship section file: https://github.com/denysdovhan/spaceship-prompt/blob/master/sections/vi_mode.zsh

Describe the solution you'd like
Porting over the existing zsh implementation of the Vi mode section file, indicating whether or not the shell is set to Vi mode, which is enabled with fish_vi_key_bindings.

Useful discussion on fish vi bindings can be found here: fish-shell/fish-shell#3232

"set SPACEFISH_PROMPT_ORDER" fails to apply

Bug Report

Current Behavior
Setting SPACESHIP_PROMPT_ORDER or SPACEFISH_PACKAGE_SHOW fails to have an affect when saved to init.fish. It also does not apply when placed inside config.fish.

set SPACEFISH_PROMPT_ORDER user dir git exec_time line_sep battery jobs char
set SPACEFISH_PACKAGE_SHOW false

Expected Behavior
Setting the above would change my prompt.

Environment

  • Spacefish version: 0.1.0
  • Fish version: 2.7.1
  • Fish plugin manager: oh-my-fish
  • Terminal emulator: iTerm
  • Operating system: OSX 10.13.4

Add "write permission" feature to dir section

Feature Request

Is your feature request related to a problem? Please describe.
This feature is intended to add the feature enhancement added to the dir section in the following two PRs:
spaceship-prompt/spaceship-prompt#340
spaceship-prompt/spaceship-prompt#517

Describe the solution you'd like
Porting over the existing zsh functionality of displaying write permissions in the dir section file that was added in this commit: spaceship-prompt/spaceship-prompt@a5d5d31

Random errors with battery section upon opening terminal

Bug Report

Current Behavior
image

Welcome to fish, the friendly interactive shell

~
โžœ Could not send process 4477, 'grep' in job 10, 'upower -e | grep battery | head -1' from group 4158 to group 4472
setpgid: Operation not permitted
Could not send job 10 ('upower -e | grep battery | head -1') to foreground
tcsetpgrp: No such process
/org/freedesktop/UPower/devices/mouse_hidpp_battery_0
Could not send process 4478, 'head' in job 10, 'upower -e | grep battery | head -1' from group 4158 to group 4472
setpgid: Operation not permitted
<Could not send job W10> (' upower -e | grep battery | head -1f') to foregroundi
stcsetpgrp: No such process
h: Could not send job 10 (โ€œupower -e | grep battery | head -1โ€) to foreground
~ setpgrp: No such process
โœฆ โžœ

Expected Behavior
Since my desktop has no battery, the battery section should exit without doing anything.
I do have upower installed as a dependency for GNOME.

Relevant Fish Configuration

I do not have a fish config file or use any extra configuration, Spacefish installed using fisher.

Environment

  • Spacefish version: v1.3.2
  • Fish version: v2.7.1
  • Fish plugin manager: Fisher
  • Terminal emulator: Alacritty
  • Operating system: Arch Linux

Possible Solution

I wonder if this is an upstream bug with Fish, since the line of code is encased in (blah blah). It shouldn't print anything.

Additional context/Screenshots
I just booted my desktop and opened a terminal window, this happened.

Implement a prompt section for .NET SDK version (.NET)

Feature Request

Is your feature request related to a problem? Please describe.
This feature is intended to achieve feature parity with the following Spaceship section file: https://github.com/denysdovhan/spaceship-prompt/blob/master/sections/dotnet.zsh

Describe the solution you'd like
Porting over the existing zsh implementation of the .NET section file, showing the current .NET version when the prompt is in the same directory as a *.csproj, *.xproj, *.sln, global.json or project.json file.

Add option to set root user prompt symbol

Feature Request

Add configuration options to set the prompt character for the root user:

  • SPACESHIP_CHAR_SYMBOL_ROOT to change the root prompt

The prompt defaults to $SPACESHIP_CHAR_SYMBOL, so this change should not alter the current behavior and not affect any users that don't change those vars.

Describe the solution you'd like
A port of the existing implementation in the following Spaceship PR: spaceship-prompt/spaceship-prompt#461

.git directory and subsequent folders do not show

Bug

Expected Behaviour

Expected .git and inner directories names to be shown in the terminal, in the space where the current directory name is normally displayed.

Actual Behaviour

Instead we have an empty space as shown in this screenshot:
screen shot 2018-03-05 at 12 27 25 am

Reproduction Steps

โžœ mkdir coolest-repo
โžœ cd coolest-repo
โžœ git init
โžœ cd .git

The behavior can be seen here. You can also see that going further in (i.e.: cd hooks) will continue the issue. cd-ing out of git solves it.

Probable Cause

Most likely the cause is the from one of the fish files that deal with git (i.e. spacefish/functions/__sf_section_git.fish)

Kubernetes included with Docker 18.09 sets the kubectl-section to always be enabled

Bug Report

Current Behavior
With the recently released Docker 18.09 (Version 2.0.0.0-mac78), I experience that the Kubernetes section is always enabled. The reason for that is Kubernetes is now included with Docker, and the kubectl command is therefore always present. The current check is only wether if the command is present or not.

Expected Behavior
The prompt added with #76 should only be visible when needed. Inside a config folder (Dockerfile, etc. Don't know how Kube works.)

Environment

  • Spacefish version: [the output of echo $SPACEFISH_VERSION]
    1.9
  • Fish version: [the output of fish --version]
    fish, version 2.7.1-1181-g18a163dc
  • Fish plugin manager: [e.g. oh-my-fish, fisher, fin]
    fundle
  • Terminal emulator: [e.g. iTerm, Hyper, Terminator]
    kitty
  • Operating system: [e.g. OSX 10.13.4, Windows 10]
    macOS Mojave

Possible Solution

Only load the section when needed.

Additional context/Screenshots

Add any other context about the problem here. If applicable, add screenshots to help explain.
screenshot 2018-11-23 at 16 17 03

Namespace required for installing prompt

Here's what happen when I try to install it in the normal way (as suggested by docs):

โฏ fisher spacefish
Installing 1 plugin/s
! Fetch spacefish github.com/fisherman/spacefish
! There was an error installing spacefish or more plugin/s.
Try using a namespace before the plugin name: owner/spacefish

Easy fix:

~/Code/banter master 
โฏ fisher matchai/spacefish
Installing 1 plugin/s
OK Fetch spacefish github.com/matchai/spacefish
Done in 15s 984ms

After this, it just proceeds to throw #16

Improve package version detection using jq, python and node

The following improvement made to the package section in spaceship should be ported over to spacefish to improve the accuracy of the version shown.

๐ŸŸ spacefish-bot โ€” Pull request copied from: spaceship-prompt/spaceship-prompt#441.

grep solution to fetch version package.json was hacky and wasn't always returning expected values. Now using other fallback methods to get version information, Following discussions from spaceship-prompt/spaceship-prompt#439

Changes

  • Fetch version information with jq with fallback to python and node.
  • Gracefully exit from the section if no version information is found or is undefined from package.json

Fix spaceship-prompt/spaceship-prompt#439
Close spaceship-prompt/spaceship-prompt#552
Close spaceship-prompt/spaceship-prompt#553

Prompt disappears under a window breakpoint

Bug Report

Current Behavior
If the width of the window is under a certain breakpoint, the entire prompt will disappear, and appears broken.

Expected Behavior
The prompt should wrap if there's not enough space inline.

Environment

  • Spacefish version: 0.1.0
  • Fish version: 2.7.1
  • Fish plugin manager: oh-my-fish
  • Terminal emulator: iTerm
  • Operating system: OSX 10.13.4

Additional context/Screenshots
Gif of the issue

Fira Code font symbols missing in vscode windows 10

{
    "terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\fish.exe",
    "terminal.integrated.env.windows": {
        "MSYSTEM": "MSYS"
    },
    "terminal.integrated.fontSize": 16,
    "terminal.integrated.fontFamily":"Fira Code",
    "editor.fontSize": 16,
    "editor.fontLigatures": true, 
    "editor.fontFamily":"Fira Code",
    "git.path": "C:\\git\\bin\\git.exe",
}

image

Also tried Fira Mono for Powerline but I can't seem to figure out how to display the last character in my case golang symbol

Second, In PowerShell terminal the arrow doesn't seem rendered correctly

image

Implement a prompt section for PHP version (๐Ÿ˜)

Feature Request

Is your feature request related to a problem? Please describe.
This feature is intended to achieve feature parity with the following Spaceship section file: https://github.com/denysdovhan/spaceship-prompt/blob/master/sections/php.zsh

Describe the solution you'd like
Porting over the existing zsh implementation of the PHP section file, showing the current PHP version when the prompt is in the same directory as a *.php or composer.json file.

Implement a prompt section for Julia version (เฎƒ)

Feature Request

Is your feature request related to a problem? Please describe.
This feature is intended to achieve feature parity with the following Spaceship section file: https://github.com/denysdovhan/spaceship-prompt/blob/master/sections/julia.zsh

Describe the solution you'd like
Porting over the existing zsh implementation of the Julia section file, showing the current Julia version when the prompt is in the same directory as a *.jl file.

Bad math expression

It would appear to me that this issue would also happen on spacefish.
A similar fix should prevent this bug from happening: spaceship-prompt/spaceship-prompt#549

... I may or may not have been looking for an excuse to test out spacefish-bot ๐Ÿ˜œ

๐ŸŸ spacefish-bot โ€” Issue copied from: spaceship-prompt/spaceship-prompt#245.

Issue

I get the following error

spaceship_battery:37: bad math expression: operator expected at `47'

Screenshot

Provide a screenshot that show your issue

screenshot

Environment

Operating system: Ubuntu 16.04 LTS
Terminal emulator: Terminator
ZSH version: zsh 5.1.1 (x86_64-ubuntu-linux-gnu)

Weird error while using and installing the prompt

I'll just drop the exact log here

fish: Unknown command '__parse_current_folder'
~/.config/fish/functions/fish_prompt.fish (line 1): 
__parse_current_folder
^
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'

fish: Unknown command '__parse_git_branch'
~/.config/fish/functions/fish_prompt.fish (line 1): 
__parse_git_branch
^
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'

fish: Unknown command '__format_time'
~/.config/fish/functions/fish_prompt.fish (line 1): 
__format_time $CMD_DURATION $pure_command_max_exec_time
^
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'

It doesn't wrap if the number of characters exceeds columns of terminal

Bug Report

Current Behavior

It doesn't wrap if the number of characters exceeds columns of terminal.

Expected Behavior

It should wrap like pure theme.

Environment

  • Spacefish version: 1.10.3
  • Fish version: fish, version 2.7.1
  • Fish plugin manager: fisher
  • Terminal emulator: iTerm, Terminal
  • Operating system: macOS 10.14.1

Additional context/Screenshots

Spacefish Pure

Add testing of oh-my-fish to the Travis CI process

Feature Request

Is your feature request related to a problem? Please describe.
At the moment, our CI process only assures that spacefish works as intended on one of the two most popular fish package managers. This issue aims to solve that missing coverage.

Describe the solution you'd like
Our Travis configuration would spawn two macOS CI runs and two Linux CI runs; one for fisher and one for oh-my-fish. Though this would result in longer CI runs, our CI process doesn't take more than a couple of minutes at the moment.

Describe alternatives you've considered
An alternative to installing fisher and omf on Travis directly would be to dockerize our CI runs and have Travis run the tests in those containers:
https://github.com/oh-my-fish/dockerfiles

I have attempted to address this issue in the past (#88), but have had issues installing omf every time.

Implement a prompt section for Ember.js version (๐Ÿน)

Feature Request

Is your feature request related to a problem? Please describe.
This feature is intended to achieve feature parity with the following Spaceship section file: https://github.com/denysdovhan/spaceship-prompt/blob/master/sections/ember.zsh

Describe the solution you'd like
Porting over the existing zsh implementation of the Ember section file, showing the current Ember version when the prompt is in the same directory as an ember-cli-build.js file.

Fix Silent Errors in Travis CI Logs

Bug Report

Current Behavior
It appears my tests for the background section are now causing silent Operation not permitted errors in the log. I wonder if this is due to a change with Travis or something, I should try to debug when I have some free time. (I'll be pretty busy all week, sadly, if anyone else wants to give it a go, feel free! ๐Ÿ’•)

Environment

  • Travis Ci Automated Testing, Linux tests - [Click me!]

Additional context/Screenshots
image

Spacefish doesn't like Raspberries ๐Ÿ“

Bug Report

Current Behavior
Installing Spacefish using fisherman causes the prompt to be totally unusable and broken due to some errors displaying the git section(s) on my Raspberry Pi Model B rev2.0.

Most likely a Fish version incompatibility.

Expected Behavior
Spacefish should either check Fish version and disable incompatible sections or potentially display a warning about an incompatible version?

Pastebin
https://pastebin.com/sE9GgcH7

Environment

  • Spacefish version: N/A, non-functional prompt
  • Fish version: fish v2.4.0
  • Fish plugin manager: fisherman
  • Terminal emulator: kitty, over SSH
  • Operating system: Raspbian 9.4 (stretch) armv6l, kernel 4.14.52+

Possible Solution
It seems to be complaining about line 84 in __sf_section_git_status.fish.

I'm also not exactly sure what the purpose of line 31 in __sf_section_git.fish. What's fff? Did someone fall asleep on their keyboard? ๐Ÿ˜‹

This is most likely a problem with fish <2.7.0.
Sadly v2.4.0 is the latest available version in Raspbian repositories. Perhaps there should be a note in the README.md to not use on Raspbian/Debian, since this fully breaks people's prompt?

Or would it be possible to add a check to disable the git section if an old version of Fish is detected? This would at least prevent people's prompt from breaking.

Additional context/Screenshots
Everything is the newest version available for Raspbian. Fresh installation, less than 1 day old.

image

Spacefish prompt derps on ^C for prematurely aborted commands

Bug Report

Current Behavior
If you use ^C (Ctrl + C) to prematurely cancel a command before you run it, the prompt somewhat derps out and overwrites the last line.

Expected Behavior
The prompt would not overwrite the last line and it would look perfect.

Environment

  • Spacefish version: N/A; No output
  • Fish version: fish, version 2.7.1
  • Fish plugin manager: oh-my-fish
  • Terminal emulator: kitty
  • Operating system: Solus (Linux 4.17.6, 64-bit)

Possible Solution
Add an extra new line to make sure text doesn't get overwritten.

Additional context/Screenshots
asciicast

Ensure functionality of spacefish on the 3.0 release of fish

Issue Details

With the release of fish 3.0, it can be expected that spacefish would require a few changes to remain compatible.

The following will need to be done:

  • Add a fish 3.0 run to CI in addition to the existing 2.0 run
  • Isolate any failures of our tests in fish 3.0
  • See if we can make non-breaking fixes to both fish versions

Hopefully, this will be a quick and easy process. ๐Ÿ˜„

cannot install github.com/matchai/spacefish -- is this a valid package?

> fisher add matchai/spacefish
fetching https://codeload.github.com/matchai/spacefish/tar.gz/master
cannot install github.com/matchai/spacefish -- is this a valid package?
done in 2.32s

config.fish

if not functions -q fisher
    set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
    curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
    fish -c fisher
end

Environment

  • Spacefish version: master
  • Fish version: 2.7.1
  • Fish plugin manager: [fisher]
  • Terminal emulator: [PS. MSYS2]
  • Operating system: [Windows 10]

exec_time not work

Bug Report

Current Behavior
exec_time not work

Expected Behavior
it will have a section with "took 3s" when sleep 3

Relevant Fish Configuration

# Your configuration here
  # Prompt
  set SPACEFISH_PROMPT_DEFAULT_PREFIX "with "
  set SPACEFISH_CHAR_SYMBOL "ฮป"
  # Time
  set SPACEFISH_TIME_SHOW true
  set SPACEFISH_TIME_FORMAT (date '+%b %d, %y %T')
  set SPACEFISH_TIME_COLOR yellow
  set SPACEFISH_EXEC_TIME_ELAPSED 1
  # user
  set SPACEFISH_USER_SHOW always
  set SPACEFISH_USER_COLOR cyan
  # git
  set SPACEFISH_GIT_STATUS_SHOW true
  # dir
  set SPACEFISH_DIR_TRUNC 0
  set SPACEFISH_DIR_TRUNC_REPO false
  set SPACEFISH_DIR_COLOR blue
  # battery
  set SPACEFISH_BATTERY_SHOW always
  # exit code
  set SPACEFISH_EXIT_CODE_SHOW true

  # order
  set SPACEFISH_PROMPT_ORDER user battery time host package node ruby golang haskell pyenv exec_time exit_code line_sep jobs dir git line_sep char
  set SPACEFISH_RPROMPT_ORDER exec_time git battery

Environment

  • Spacefish version: 1.1.0
  • Fish version: fish, version 2.7.1-1450-gf823611c
  • Fish plugin manager: fisherman
  • Terminal emulator: terminal
  • Operating system: macOS Majave

Possible Solution

Seems in my fish shell, there is no var named CMD_DURATION but cmd_duration, thus, when I changed $CMD_DURATION to $cmd_duration in __sf_section_exec_time.fish, it works well.

Windows MSYS2: -uThe system cannot find the file specified.

After installation trough fisher and installing powerfont fish gives the following error

if not functions -q fisher
    set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
    curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
    fish -c fisher
end

Environment

  • Spacefish version: [the output of echo $SPACEFISH_VERSION]
  • Fish version: [2.7.1]
  • Fish plugin manager: fisher
  • Terminal emulator: [VSCode]
  • Operating system: [Windows 10]

image

Implement a prompt section for Rust version (๐—ฅ)

Feature Request

Is your feature request related to a problem? Please describe.
This feature is intended to achieve feature parity with the following Spaceship section file: https://github.com/denysdovhan/spaceship-prompt/blob/master/sections/rust.zsh

Describe the solution you'd like
Porting over the existing zsh implementation of the Rust section file, showing the current Rust version when the prompt is in the same directory as a *.rs or cargo.toml file.

Spacefish prompt - Unknown command '__sf_util_set_default'

Bug Report

Current Behavior
Loading spacefish prompt over SSH, after switching user, causes errors. Both clients/users are using fish with oh-my-fish and spacefish.

I don't seem to get the same error when opening the terminal on the machine. It seems to only be an SSH issue of some kind.

Expected Behavior
Spacefish prompt works perfectly! ๐Ÿš€

Relevant Fish Configuration
No extra configuration. N/A.

Environment

  • Spacefish version: N/A, No output. Installed today using omf.
  • Fish version: Fish 2.7.0
  • Fish plugin manager: oh-my-fish
  • Terminal emulator: Kitty terminal
  • Operating system: Solus (Linux 4.17.6 64-bit)

Possible Solution
Fix the line that Fish is erroring on?

Additional context/Screenshots
This occurs over SSH after switching user. Both users and machines have spacefish installed with identical versions.

fish: Unknown command '__sf_util_set_default'
~/.config/fish/functions/fish_prompt.fish (line 8): 
        __sf_util_set_default SPACEFISH_PROMPT_ADD_NEWLINE true
        ^
in function 'fish_prompt'
        called on standard input

in command substitution
        called on standard input

fish: Unknown command '__sf_util_set_default'
~/.config/fish/functions/fish_prompt.fish (line 9): 
        __sf_util_set_default SPACEFISH_PROMPT_FIRST_PREFIX_SHOW false
        ^
in function 'fish_prompt'
        called on standard input

in command substitution
        called on standard input

fish: Unknown command '__sf_util_set_default'
~/.config/fish/functions/fish_prompt.fish (line 10): 
        __sf_util_set_default SPACEFISH_PROMPT_PREFIXES_SHOW true
        ^
in function 'fish_prompt'
        called on standard input

in command substitution
        called on standard input

fish: Unknown command '__sf_util_set_default'
~/.config/fish/functions/fish_prompt.fish (line 11): 
        __sf_util_set_default SPACEFISH_PROMPT_SUFFIXES_SHOW true
        ^
in function 'fish_prompt'
        called on standard input

in command substitution
        called on standard input

fish: Unknown command '__sf_util_set_default'
~/.config/fish/functions/fish_prompt.fish (line 12): 
        __sf_util_set_default SPACEFISH_PROMPT_DEFAULT_PREFIX "via "
        ^
in function 'fish_prompt'
        called on standard input

in command substitution
        called on standard input

fish: Unknown command '__sf_util_set_default'
~/.config/fish/functions/fish_prompt.fish (line 13): 
        __sf_util_set_default SPACEFISH_PROMPT_DEFAULT_SUFFIX " "
        ^
in function 'fish_prompt'
        called on standard input

in command substitution
        called on standard input

fish: Unknown command '__sf_util_set_default'
~/.config/fish/functions/fish_prompt.fish (line 14): 
        __sf_util_set_default SPACEFISH_PROMPT_ORDER user dir git package node ruby exec_time line_sep battery char
        ^
in function 'fish_prompt'
        called on standard input

in command substitution
        called on standard input

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.