-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #202 from rtCamp/develop
Bump v0.15.0
- Loading branch information
Showing
47 changed files
with
1,826 additions
and
511 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -78,6 +78,7 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: main | ||
fetch-depth: 0 | ||
|
||
- name: Set up tag | ||
|
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
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
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
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Based on gnsh theme | ||
|
||
setopt prompt_subst | ||
|
||
() { | ||
|
||
local PR_USER PR_USER_OP PR_PROMPT PR_HOST | ||
|
||
# Check the UID | ||
if [[ $UID -ne 0 ]]; then # normal user | ||
PR_USER='%F{green}%n%f' | ||
PR_USER_OP='%F{green}%#%f' | ||
PR_PROMPT='%f➤ %f' | ||
else # root | ||
PR_USER='%F{red}%n%f' | ||
PR_USER_OP='%F{red}%#%f' | ||
PR_PROMPT='%F{red}➤ %f' | ||
fi | ||
|
||
FM_HOST() { | ||
local default_hostname="%${1}" | ||
local common_site_config="/workspace/frappe-bench/sites/common_site_config.json" | ||
if [[ -f "$common_site_config" ]]; then | ||
fm_hostname=$(jq -r .default_site "$common_site_config") | ||
if [[ "$fm_hostname" != "null" ]]; then | ||
echo "$fm_hostname" | ||
else | ||
echo "$default_hostname" # Default to hostname | ||
fi | ||
else | ||
echo "$default_hostname" # Default to hostname | ||
fi | ||
} | ||
|
||
# Check if we are on SSH or not | ||
if [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]; then | ||
PR_HOST='%F{red}$(FM_HOST M)%f' # SSH | ||
else | ||
PR_HOST='%F{green}$(FM_HOST m)%f' # no SSH | ||
fi | ||
|
||
local return_code="%(?..%F{red}%? ↵%f)" | ||
|
||
local user_host="${PR_USER}%F{cyan}@${PR_HOST}" | ||
local current_dir="%B%F{blue}%~%f%b" | ||
local git_branch='$(git_prompt_info)' | ||
|
||
PROMPT="╭─${user_host} ${current_dir} \$(ruby_prompt_info) ${git_branch} | ||
╰─$PR_PROMPT " | ||
RPROMPT="${return_code}" | ||
|
||
ZSH_THEME_GIT_PROMPT_PREFIX="%F{yellow}‹" | ||
ZSH_THEME_GIT_PROMPT_SUFFIX="› %f" | ||
ZSH_THEME_RUBY_PROMPT_PREFIX="%F{red}‹" | ||
ZSH_THEME_RUBY_PROMPT_SUFFIX="›%f" | ||
|
||
} |
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.