-
-
Notifications
You must be signed in to change notification settings - Fork 962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Breaking changes (order, colors, suffixes) #78
Conversation
511d459
to
937b7cc
Compare
Asigment character looks much more obvious than minus in this context.
937b7cc
to
41ec9e5
Compare
Any update on when this will be merged? |
@sfarzy it's not ready yet. I'm working on it right now. Unfortunately, I don't have enough time to finish it :( |
c827f44
to
cd967e3
Compare
cd967e3
to
13d0e2c
Compare
3878715
to
b2eef7a
Compare
spaceship.zsh
Outdated
SPACESHIP_GIT_UNPULLED="${SPACESHIP_GIT_UNPULLED:="⇣"}" | ||
SPACESHIP_GIT_UNPUSHED="${SPACESHIP_GIT_UNPUSHED:="⇡"}" | ||
SPACESHIP_GIT_COLOR="${SPACESHIP_GIT_COLOR:="magenta"}" | ||
SPACESHIP_GIT_SYMBOL="${SPACESHIP_GIT_SYMBOL:=" "}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this symbol from powerline fonts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's why we have exposed it as $SPACESHIP_GIT_SYMBOL
, so it could be replaced by anything else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Giving users a heads up will be nice. All other symbols are compatible with normal fonts, so now we are depending on powerline for a single symbol.
One suggestion is to use u2387 ( ⎇ )
instead of ue0a0 ( )
. Which compatible with most fonts tested, even though it doesn't look good as the latter.
It's just a suggestion ignore if irrelevant.
I've been experimenting a bit with new options and find out that Spaceship became highly customizible. Take a look at this: GIF Preview: Connected via SSH: Here are my options: # ORDER
SPACESHIP_PROMPT_ORDER=(
time #
vi_mode # these sections will be
user # before prompt char
host #
char
dir
git
node
ruby
xcode
swift
golang
docker
venv
pyenv
)
# USER
SPACESHIP_USER_PREFIX="" # remove `with` before username
SPACESHIP_USER_SUFFIX="" # remove space before host
# HOST
# Result will look like this:
# username@:(hostname)
SPACESHIP_HOST_PREFIX="@:("
SPACESHIP_HOST_SUFFIX=") "
# DIR
SPACESHIP_DIR_PREFIX='' # disable directory prefix, cause it's not the first section
SPACESHIP_DIR_TRUNC='1' # show only last directory
# GIT
# Disable git symbol
SPACESHIP_GIT_SYMBOL="" # disable git prefix
SPACESHIP_GIT_BRANCH_PREFIX="" # disable branch prefix too
# Wrap git in `git:(...)`
SPACESHIP_GIT_PREFIX='git:('
SPACESHIP_GIT_SUFFIX=") "
SPACESHIP_GIT_BRANCH_SUFFIX="" # remove space after branch name
# Unwrap git status from `[...]`
SPACESHIP_GIT_STATUS_PREFIX=""
SPACESHIP_GIT_STATUS_SUFFIX=""
# NODE
SPACESHIP_NODE_PREFIX="node:("
SPACESHIP_NODE_SUFFIX=") "
SPACESHIP_NODE_SYMBOL=""
# RUBY
SPACESHIP_RUBY_PREFIX="ruby:("
SPACESHIP_RUBY_SUFFIX=") "
SPACESHIP_RUBY_SYMBOL=""
# XCODE
SPACESHIP_XCODE_PREFIX="xcode:("
SPACESHIP_XCODE_SUFFIX=") "
SPACESHIP_XCODE_SYMBOL=""
# SWIFT
SPACESHIP_SWIFT_PREFIX="swift:("
SPACESHIP_SWIFT_SUFFIX=") "
SPACESHIP_SWIFT_SYMBOL=""
# GOLANG
SPACESHIP_GOLANG_PREFIX="go:("
SPACESHIP_GOLANG_SUFFIX=") "
SPACESHIP_GOLANG_SYMBOL=""
# DOCKER
SPACESHIP_DOCKER_PREFIX="docker:("
SPACESHIP_DOCKER_SUFFIX=") "
SPACESHIP_DOCKER_SYMBOL=""
# VENV
SPACESHIP_VENV_PREFIX="venv:("
SPACESHIP_VENV_SUFFIX=") "
# PYENV
SPACESHIP_PYENV_PREFIX="python:("
SPACESHIP_PYENV_SUFFIX=") "
SPACESHIP_PYENV_SYMBOL="" Gonna share this setup in Presets wiki-page |
Hooray! 🎉 |
Close spaceship-prompt#92 See the related discussion at spaceship-prompt#78 (comment)
Implementation of custom prompt ordering. See #71 for more information.
UPD: This PR is going to introduce the biggest internal changes since Spaceship's first release. Here's the list of changes:
_exists
helper$SPACESHIP_PROMPT_ORDER
variable.time
anduser
sections$SPACESHIP_*_SUFFIX
variables)$SPACESHIP_*_COLOR
variables)_prompt_section
is used for drawing sectionsuser
,host
anddir
sections are standalone_
nvm
→node
⬢ n support #70$SPACESHIP_NODE_DEFAULT_VERSION
for default Node.js version What if the user don't use nvm? #33➜
instead of➔
git
->git_branch
+git_status
with their own prefixes, suffixes and colors
is used as a git symbol (for visual difference with ☿ Mercurial support #54).editorconfig