Merge branch 'ohmyzsh:master' into pdfcreating

This commit is contained in:
Hex-Tron 2024-10-06 19:52:27 +05:30 committed by GitHub
commit fde545c4ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 55 additions and 30 deletions

View file

@ -1,10 +1,14 @@
## Bazaar integration ## Bazaar integration
## Just works with the GIT integration just add $(bzr_prompt_info) to the PROMPT ## Just works with the GIT integration. Add $(bzr_prompt_info) to the PROMPT
function bzr_prompt_info() { function bzr_prompt_info() {
BZR_CB=`bzr nick 2> /dev/null | grep -v "ERROR" | cut -d ":" -f2 | awk -F / '{print "bzr::"$1}'` local bzr_branch
if [ -n "$BZR_CB" ]; then bzr_branch=$(bzr nick 2>/dev/null) || return
BZR_DIRTY=""
[[ -n `bzr status` ]] && BZR_DIRTY=" %{$fg[red]%} * %{$fg[green]%}" if [[ -n "$bzr_branch" ]]; then
echo "$ZSH_THEME_SCM_PROMPT_PREFIX$BZR_CB$BZR_DIRTY$ZSH_THEME_GIT_PROMPT_SUFFIX" local bzr_dirty=""
fi if [[ -n $(bzr status 2>/dev/null) ]]; then
} bzr_dirty=" %{$fg[red]%}*%{$reset_color%}"
fi
printf "%s%s%s%s" "$ZSH_THEME_SCM_PROMPT_PREFIX" "bzr::${bzr_branch##*:}" "$bzr_dirty" "$ZSH_THEME_GIT_PROMPT_SUFFIX"
fi
}

View file

@ -397,8 +397,23 @@ function _omz::plugin::info {
local readme local readme
for readme in "$ZSH_CUSTOM/plugins/$1/README.md" "$ZSH/plugins/$1/README.md"; do for readme in "$ZSH_CUSTOM/plugins/$1/README.md" "$ZSH/plugins/$1/README.md"; do
if [[ -f "$readme" ]]; then if [[ -f "$readme" ]]; then
(( ${+commands[less]} )) && less "$readme" || cat "$readme" # If being piped, just cat the README
return 0 if [[ ! -t 1 ]]; then
cat "$readme"
return $?
fi
# Enrich the README display depending on the tools we have
# - glow: https://github.com/charmbracelet/glow
# - bat: https://github.com/sharkdp/bat
# - less: typical pager command
case 1 in
${+commands[glow]}) glow -p "$readme" ;;
${+commands[bat]}) bat -l md --style plain "$readme" ;;
${+commands[less]}) less "$readme" ;;
*) cat "$readme" ;;
esac
return $?
fi fi
done done

View file

@ -5,8 +5,8 @@
# If they are not set yet, they will be # If they are not set yet, they will be
# overwritten with their default values # overwritten with their default values
default fastfile_dir "${HOME}/.fastfile" fastfile_dir="${fastfile_dir:-${HOME}/.fastfile}"
default fastfile_var_prefix " fastfile_var_prefix="${fastfile_var_prefix:-§}"
########################### ###########################
# Impl # Impl

View file

@ -15,23 +15,25 @@ plugins=(... opentofu)
## Aliases ## Aliases
| Alias | Command | | Alias | Command |
|--------|-----------------------| |--------|------------------------------|
| `tt` | `tofu` | | `tt` | `tofu` |
| `tta` | `tofu apply` | | `tta` | `tofu apply` |
| `ttc` | `tofu console` | | `ttaa` | `tofu apply -auto-approve` |
| `ttd` | `tofu destroy` | | `ttc` | `tofu console` |
| `ttf` | `tofu fmt` | | `ttd` | `tofu destroy` |
| `ttfr` | `tofu fmt -recursive` | | `ttd!` | `tofu destroy -auto-approve` |
| `tti` | `tofu init` | | `ttf` | `tofu fmt` |
| `tto` | `tofu output` | | `ttfr` | `tofu fmt -recursive` |
| `ttp` | `tofu plan` | | `tti` | `tofu init` |
| `ttv` | `tofu validate` | | `tto` | `tofu output` |
| `tts` | `tofu state` | | `ttp` | `tofu plan` |
| `ttsh` | `tofu show` | | `ttv` | `tofu validate` |
| `ttr` | `tofu refresh` | | `tts` | `tofu state` |
| `ttt` | `tofu test` | | `ttsh` | `tofu show` |
| `ttws` | `tofu workspace` | | `ttr` | `tofu refresh` |
| `ttt` | `tofu test` |
| `ttws` | `tofu workspace` |
## Prompt functions ## Prompt functions

View file

@ -29,8 +29,10 @@ function tofu_version_prompt_info() {
alias tt='tofu' alias tt='tofu'
alias tta='tofu apply' alias tta='tofu apply'
alias ttaa='tofu apply -auto-approve'
alias ttc='tofu console' alias ttc='tofu console'
alias ttd='tofu destroy' alias ttd='tofu destroy'
alias ttd!='tofu destroy -auto-approve'
alias ttf='tofu fmt' alias ttf='tofu fmt'
alias ttfr='tofu fmt -recursive' alias ttfr='tofu fmt -recursive'
alias tti='tofu init' alias tti='tofu init'

View file

@ -22,6 +22,7 @@ plugins=(... terraform)
| `tfaa` | `terraform apply -auto-approve` | | `tfaa` | `terraform apply -auto-approve` |
| `tfc` | `terraform console` | | `tfc` | `terraform console` |
| `tfd` | `terraform destroy` | | `tfd` | `terraform destroy` |
| `tfd!` | `terraform destroy -auto-approve`|
| `tff` | `terraform fmt` | | `tff` | `terraform fmt` |
| `tffr` | `terraform fmt -recursive` | | `tffr` | `terraform fmt -recursive` |
| `tfi` | `terraform init` | | `tfi` | `terraform init` |

View file

@ -20,6 +20,7 @@ alias tfa='terraform apply'
alias tfaa='terraform apply -auto-approve' alias tfaa='terraform apply -auto-approve'
alias tfc='terraform console' alias tfc='terraform console'
alias tfd='terraform destroy' alias tfd='terraform destroy'
alias 'tfd!'='terraform destroy -auto-approve'
alias tff='terraform fmt' alias tff='terraform fmt'
alias tffr='terraform fmt -recursive' alias tffr='terraform fmt -recursive'
alias tfi='terraform init' alias tfi='terraform init'

View file

@ -1,4 +1,4 @@
#!/bin/zsh #!/usr/bin/env zsh
# Zsh Theme Chooser by fox (fox91 at anche dot no) # Zsh Theme Chooser by fox (fox91 at anche dot no)
# This program is free software. It comes without any warranty, to # This program is free software. It comes without any warranty, to