Skip to content
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

Added suffix configuration #102

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ You can find color configuration for specific plugins under the

```shell
GEOMETRY_PROMPT_PREFIX="$'\n'" # prefix prompt with a new line
GEOMETRY_PROMPT_SUFFIX="" # suffix prompt
GEOMETRY_PLUGIN_SEPARATOR=" " # use ' ' to separate right prompt parts
```

Expand Down
6 changes: 3 additions & 3 deletions geometry.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ PROMPT_GEOMETRY_RPROMPT_ASYNC=${PROMPT_GEOMETRY_RPROMPT_ASYNC:-true}
PROMPT_GEOMETRY_ENABLE_PLUGINS=${PROMPT_GEOMETRY_ENABLE_PLUGINS:-true}

# Misc configurations
GEOMETRY_PROMPT_PREFIX=${GEOMETRY_PROMPT_PREFIX:-"
"}
GEOMETRY_PROMPT_PREFIX=${GEOMETRY_PROMPT_PREFIX:-$'\n'}
GEOMETRY_PROMPT_SUFFIX=${GEOMETRY_PROMPT_SUFFIX:-''}

# Show current command in title
prompt_geometry_set_cmd_title() {
Expand Down Expand Up @@ -64,7 +64,7 @@ prompt_geometry_render() {
PROMPT_SYMBOL=$GEOMETRY_SYMBOL_EXIT_VALUE
fi

PROMPT="$GEOMETRY_PROMPT_PREFIX %${#PROMPT_SYMBOL}{%(?.$GEOMETRY_PROMPT.$GEOMETRY_EXIT_VALUE)%} %F{$GEOMETRY_COLOR_DIR}%3~%f "
PROMPT="$GEOMETRY_PROMPT_PREFIX %${#PROMPT_SYMBOL}{%(?.$GEOMETRY_PROMPT.$GEOMETRY_EXIT_VALUE)%} %F{$GEOMETRY_COLOR_DIR}%3~%f $GEOMETRY_PROMPT_SUFFIX"

PROMPT2=" $GEOMETRY_SYMBOL_RPROMPT "

Expand Down