1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2025-12-12 15:34:50 +08:00

Compare commits

...

7 Commits

Author SHA1 Message Date
Marc Cornellà
fd51207701
Remove missing screenshots from kube-ps1 README (#9199)
Removes missing screenshots from README for kube-ps1 plugin.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2020-10-10 21:43:12 +02:00
Sreekanth S
c66d8a841d
agnoster: fix icon for unstaged git status (#9164) 2020-10-10 21:39:21 +02:00
Marc Cornellà
6e7b861675 lib: fix regex bug in git_prompt_status
Fixes #9326
2020-10-10 19:14:30 +02:00
Marc Cornellà
2376022890 lib: remove share_history
Related: #2537, #9324
2020-10-10 12:38:17 +02:00
Marc Cornellà
75ae0e905f lib: fix omz help and reword 2020-10-10 12:12:22 +02:00
Marc Cornellà
982d010be5 lib: fix fmt removing ESC characters in theme and plugin list CLI commands 2020-10-10 11:47:09 +02:00
hasheddan
2d97e102b2
Remove missing screenshots from kube-ps1 README
Removes missing screenshots from README for kube-ps1 plugin.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2020-08-22 09:00:06 -05:00
5 changed files with 29 additions and 33 deletions

View File

@ -60,8 +60,9 @@ Usage: omz <command> [options]
Available commands:
help Print this help message
pr <command> Commands for Oh My Zsh Pull Requests management
theme <command> Commands for Oh My Zsh themes management
plugin <command> Manage plugins
pr <command> Manage Oh My Zsh Pull Requests
theme <command> Manage themes
update Update Oh My Zsh
EOF
@ -134,18 +135,20 @@ function _omz::plugin::list {
custom_plugins=("$ZSH_CUSTOM"/plugins/*(/N:t))
builtin_plugins=("$ZSH"/plugins/*(/N:t))
(( ${#custom_plugins} )) && {
print -Pn "%U%BCustom plugins%b%u: "
print -l ${(q-)custom_plugins}
} | fmt -w $COLUMNS
{
(( ${#custom_plugins} )) && {
print -Pn "%U%BCustom plugins%b%u: "
print -l ${(q-)custom_plugins}
}
(( ${#builtin_plugins} )) && {
# add a line of separation
(( ${#custom_plugins} )) && echo
(( ${#builtin_plugins} )) && {
# add a line of separation
(( ${#custom_plugins} )) && echo
print -Pn "%U%BBuilt-in plugins%b%u: "
print -l ${(q-)builtin_plugins}
} | fmt -w $COLUMNS
print -Pn "%U%BBuilt-in plugins%b%u: "
print -l ${(q-)builtin_plugins}
}
} | fmt -w $COLUMNS | sed -E $'s/\e?(\\[[0-9]*m)/\e\\1/g' # deal with fmt removing ESC
}
function _omz::pr {
@ -305,18 +308,20 @@ function _omz::theme::list {
custom_themes=("$ZSH_CUSTOM"/**/*.zsh-theme(.N:r:gs:"$ZSH_CUSTOM"/themes/:::gs:"$ZSH_CUSTOM"/:::))
builtin_themes=("$ZSH"/themes/*.zsh-theme(.N:t:r))
(( ${#custom_themes} )) && {
print -Pn "%U%BCustom themes%b%u: "
print -l ${(q-)custom_themes}
} | fmt -w $COLUMNS
{
(( ${#custom_themes} )) && {
print -Pn "%U%BCustom themes%b%u: "
print -l ${(q-)custom_themes}
}
(( ${#builtin_themes} )) && {
# add a line of separation
(( ${#custom_themes} )) && echo
(( ${#builtin_themes} )) && {
# add a line of separation
(( ${#custom_themes} )) && echo
print -Pn "%U%BBuilt-in themes%b%u: "
print -l ${(q-)builtin_themes}
} | fmt -w $COLUMNS
print -Pn "%U%BBuilt-in themes%b%u: "
print -l ${(q-)builtin_themes}
}
} | fmt -w $COLUMNS | sed -E $'s/\e?(\\[[0-9]*m)/\e\\1/g' # deal with fmt removing ESC
}
function _omz::theme::use {

View File

@ -226,7 +226,7 @@ function git_prompt_status() {
# For each status prefix, do a regex comparison
for status_prefix in ${(k)prefix_constant_map}; do
local status_constant="${prefix_constant_map[$status_prefix]}"
local status_regex="(^|\n)$status_prefix"
local status_regex=$'(^|\n)'"$status_prefix"
if [[ "$status_text" =~ $status_regex ]]; then
statuses_seen[$status_constant]=1

View File

@ -36,4 +36,3 @@ setopt hist_expire_dups_first # delete duplicates first when HISTFILE size excee
setopt hist_ignore_dups # ignore duplicated commands history list
setopt hist_ignore_space # ignore commands that start with space
setopt hist_verify # show command with history expansion to user before running it
setopt share_history # share command history data

View File

@ -6,14 +6,6 @@ configured on `kubectl` to your Bash/Zsh prompt strings (i.e. the `$PS1`).
Inspired by several tools used to simplify usage of `kubectl`.
![prompt](img/screenshot2.png)
![prompt_sol_light](img/screenshot-sol-light.png)
![prompt_img](img/screenshot-img.png)
![prompt demo](img/kube-ps1.gif)
## Installing
### MacOS

View File

@ -131,7 +131,7 @@ prompt_git() {
zstyle ':vcs_info:*' get-revision true
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*' stagedstr '✚'
zstyle ':vcs_info:*' unstagedstr ''
zstyle ':vcs_info:*' unstagedstr '±'
zstyle ':vcs_info:*' formats ' %u%c'
zstyle ':vcs_info:*' actionformats ' %u%c'
vcs_info