This repository has been archived by the owner on Feb 3, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
1,153 additions
and
1,108 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
function fish_mode_prompt | ||
# Overriden by Spacefish fishshell theme | ||
# To see vi mode in prompt add 'vi_mode' to SPACEFISH_PROMPT_ORDER | ||
# Overriden by Spacefish fishshell theme | ||
# To see vi mode in prompt add 'vi_mode' to SPACEFISH_PROMPT_ORDER | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
function fish_prompt | ||
# Store the exit code of the last command | ||
set -g sf_exit_code $status | ||
set -g SPACEFISH_VERSION 2.0.1 | ||
# Store the exit code of the last command | ||
set -g sf_exit_code $status | ||
set -g SPACEFISH_VERSION 2.0.1 | ||
|
||
# ------------------------------------------------------------------------------ | ||
# Configuration | ||
# ------------------------------------------------------------------------------ | ||
# ------------------------------------------------------------------------------ | ||
# Configuration | ||
# ------------------------------------------------------------------------------ | ||
|
||
__sf_util_set_default SPACEFISH_PROMPT_ADD_NEWLINE true | ||
__sf_util_set_default SPACEFISH_PROMPT_FIRST_PREFIX_SHOW false | ||
__sf_util_set_default SPACEFISH_PROMPT_PREFIXES_SHOW true | ||
__sf_util_set_default SPACEFISH_PROMPT_SUFFIXES_SHOW true | ||
__sf_util_set_default SPACEFISH_PROMPT_DEFAULT_PREFIX "via " | ||
__sf_util_set_default SPACEFISH_PROMPT_DEFAULT_SUFFIX " " | ||
__sf_util_set_default SPACEFISH_PROMPT_ORDER time user dir host git package node ruby golang php rust haskell julia docker aws conda pyenv dotnet kubecontext exec_time line_sep battery vi_mode jobs exit_code char | ||
__sf_util_set_default SPACEFISH_PROMPT_ADD_NEWLINE true | ||
__sf_util_set_default SPACEFISH_PROMPT_FIRST_PREFIX_SHOW false | ||
__sf_util_set_default SPACEFISH_PROMPT_PREFIXES_SHOW true | ||
__sf_util_set_default SPACEFISH_PROMPT_SUFFIXES_SHOW true | ||
__sf_util_set_default SPACEFISH_PROMPT_DEFAULT_PREFIX "via " | ||
__sf_util_set_default SPACEFISH_PROMPT_DEFAULT_SUFFIX " " | ||
__sf_util_set_default SPACEFISH_PROMPT_ORDER time user dir host git package node ruby golang php rust haskell julia docker aws conda pyenv dotnet kubecontext exec_time line_sep battery vi_mode jobs exit_code char | ||
|
||
# ------------------------------------------------------------------------------ | ||
# Sections | ||
# ------------------------------------------------------------------------------ | ||
# ------------------------------------------------------------------------------ | ||
# Sections | ||
# ------------------------------------------------------------------------------ | ||
|
||
# Keep track of whether the prompt has already been opened | ||
set -g sf_prompt_opened $SPACEFISH_PROMPT_FIRST_PREFIX_SHOW | ||
# Keep track of whether the prompt has already been opened | ||
set -g sf_prompt_opened $SPACEFISH_PROMPT_FIRST_PREFIX_SHOW | ||
|
||
if test "$SPACEFISH_PROMPT_ADD_NEWLINE" = "true" | ||
echo | ||
end | ||
if test "$SPACEFISH_PROMPT_ADD_NEWLINE" = "true" | ||
echo | ||
end | ||
|
||
for i in $SPACEFISH_PROMPT_ORDER | ||
eval __sf_section_$i | ||
end | ||
set_color normal | ||
for i in $SPACEFISH_PROMPT_ORDER | ||
eval __sf_section_$i | ||
end | ||
set_color normal | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
function fish_right_prompt | ||
|
||
# ------------------------------------------------------------------------------ | ||
# Configuration | ||
# ------------------------------------------------------------------------------ | ||
# ------------------------------------------------------------------------------ | ||
# Configuration | ||
# ------------------------------------------------------------------------------ | ||
|
||
__sf_util_set_default SPACEFISH_RPROMPT_ORDER "" | ||
__sf_util_set_default SPACEFISH_RPROMPT_ORDER "" | ||
|
||
# ------------------------------------------------------------------------------ | ||
# Sections | ||
# ------------------------------------------------------------------------------ | ||
# ------------------------------------------------------------------------------ | ||
# Sections | ||
# ------------------------------------------------------------------------------ | ||
|
||
[ -n "$SPACEFISH_RPROMPT_ORDER" ]; or return | ||
[ -n "$SPACEFISH_RPROMPT_ORDER" ] | ||
or return | ||
|
||
for i in $SPACEFISH_RPROMPT_ORDER | ||
eval __sf_section_$i | ||
end | ||
set_color normal | ||
for i in $SPACEFISH_RPROMPT_ORDER | ||
eval __sf_section_$i | ||
end | ||
set_color normal | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
function __sf_lib_section -a color prefix content suffix | ||
# If there are only 2 args, they're content and prefix | ||
if test (count $argv) -eq 2 | ||
set content $argv[2] | ||
set prefix | ||
end | ||
# If there are only 2 args, they're content and prefix | ||
if test (count $argv) -eq 2 | ||
set content $argv[2] | ||
set prefix | ||
end | ||
|
||
if test "$sf_prompt_opened" = "true" -a "$SPACEFISH_PROMPT_PREFIXES_SHOW" = "true" | ||
# Echo prefixes in bold white | ||
set_color --bold | ||
echo -e -n -s $prefix | ||
set_color normal | ||
end | ||
if test "$sf_prompt_opened" = "true" -a "$SPACEFISH_PROMPT_PREFIXES_SHOW" = "true" | ||
# Echo prefixes in bold white | ||
set_color --bold | ||
echo -e -n -s $prefix | ||
set_color normal | ||
end | ||
|
||
# Set the prompt as having been opened | ||
set -g sf_prompt_opened true | ||
# Set the prompt as having been opened | ||
set -g sf_prompt_opened true | ||
|
||
set_color --bold $color | ||
echo -e -n $content | ||
set_color normal | ||
set_color --bold $color | ||
echo -e -n $content | ||
set_color normal | ||
|
||
if test "$SPACEFISH_PROMPT_SUFFIXES_SHOW" = "true" | ||
# Echo suffixes in bold white | ||
set_color --bold | ||
echo -e -n -s $suffix | ||
set_color normal | ||
end | ||
if test "$SPACEFISH_PROMPT_SUFFIXES_SHOW" = "true" | ||
# Echo suffixes in bold white | ||
set_color --bold | ||
echo -e -n -s $suffix | ||
set_color normal | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.