mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-30 02:44:42 +01:00
Merge branch 'ohmyzsh:master' into pdfcreating
This commit is contained in:
commit
fde545c4ca
8 changed files with 55 additions and 30 deletions
18
lib/bzr.zsh
18
lib/bzr.zsh
|
|
@ -1,10 +1,14 @@
|
|||
## 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() {
|
||||
BZR_CB=`bzr nick 2> /dev/null | grep -v "ERROR" | cut -d ":" -f2 | awk -F / '{print "bzr::"$1}'`
|
||||
if [ -n "$BZR_CB" ]; then
|
||||
BZR_DIRTY=""
|
||||
[[ -n `bzr status` ]] && BZR_DIRTY=" %{$fg[red]%} * %{$fg[green]%}"
|
||||
echo "$ZSH_THEME_SCM_PROMPT_PREFIX$BZR_CB$BZR_DIRTY$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||
fi
|
||||
local bzr_branch
|
||||
bzr_branch=$(bzr nick 2>/dev/null) || return
|
||||
|
||||
if [[ -n "$bzr_branch" ]]; then
|
||||
local bzr_dirty=""
|
||||
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
|
||||
}
|
||||
19
lib/cli.zsh
19
lib/cli.zsh
|
|
@ -397,8 +397,23 @@ function _omz::plugin::info {
|
|||
local readme
|
||||
for readme in "$ZSH_CUSTOM/plugins/$1/README.md" "$ZSH/plugins/$1/README.md"; do
|
||||
if [[ -f "$readme" ]]; then
|
||||
(( ${+commands[less]} )) && less "$readme" || cat "$readme"
|
||||
return 0
|
||||
# If being piped, just cat the README
|
||||
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
|
||||
done
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
# If they are not set yet, they will be
|
||||
# overwritten with their default values
|
||||
|
||||
default fastfile_dir "${HOME}/.fastfile"
|
||||
default fastfile_var_prefix "§"
|
||||
fastfile_dir="${fastfile_dir:-${HOME}/.fastfile}"
|
||||
fastfile_var_prefix="${fastfile_var_prefix:-§}"
|
||||
|
||||
###########################
|
||||
# Impl
|
||||
|
|
|
|||
|
|
@ -15,23 +15,25 @@ plugins=(... opentofu)
|
|||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command |
|
||||
|--------|-----------------------|
|
||||
| `tt` | `tofu` |
|
||||
| `tta` | `tofu apply` |
|
||||
| `ttc` | `tofu console` |
|
||||
| `ttd` | `tofu destroy` |
|
||||
| `ttf` | `tofu fmt` |
|
||||
| `ttfr` | `tofu fmt -recursive` |
|
||||
| `tti` | `tofu init` |
|
||||
| `tto` | `tofu output` |
|
||||
| `ttp` | `tofu plan` |
|
||||
| `ttv` | `tofu validate` |
|
||||
| `tts` | `tofu state` |
|
||||
| `ttsh` | `tofu show` |
|
||||
| `ttr` | `tofu refresh` |
|
||||
| `ttt` | `tofu test` |
|
||||
| `ttws` | `tofu workspace` |
|
||||
| Alias | Command |
|
||||
|--------|------------------------------|
|
||||
| `tt` | `tofu` |
|
||||
| `tta` | `tofu apply` |
|
||||
| `ttaa` | `tofu apply -auto-approve` |
|
||||
| `ttc` | `tofu console` |
|
||||
| `ttd` | `tofu destroy` |
|
||||
| `ttd!` | `tofu destroy -auto-approve` |
|
||||
| `ttf` | `tofu fmt` |
|
||||
| `ttfr` | `tofu fmt -recursive` |
|
||||
| `tti` | `tofu init` |
|
||||
| `tto` | `tofu output` |
|
||||
| `ttp` | `tofu plan` |
|
||||
| `ttv` | `tofu validate` |
|
||||
| `tts` | `tofu state` |
|
||||
| `ttsh` | `tofu show` |
|
||||
| `ttr` | `tofu refresh` |
|
||||
| `ttt` | `tofu test` |
|
||||
| `ttws` | `tofu workspace` |
|
||||
|
||||
|
||||
## Prompt functions
|
||||
|
|
|
|||
|
|
@ -29,8 +29,10 @@ function tofu_version_prompt_info() {
|
|||
|
||||
alias tt='tofu'
|
||||
alias tta='tofu apply'
|
||||
alias ttaa='tofu apply -auto-approve'
|
||||
alias ttc='tofu console'
|
||||
alias ttd='tofu destroy'
|
||||
alias ttd!='tofu destroy -auto-approve'
|
||||
alias ttf='tofu fmt'
|
||||
alias ttfr='tofu fmt -recursive'
|
||||
alias tti='tofu init'
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ plugins=(... terraform)
|
|||
| `tfaa` | `terraform apply -auto-approve` |
|
||||
| `tfc` | `terraform console` |
|
||||
| `tfd` | `terraform destroy` |
|
||||
| `tfd!` | `terraform destroy -auto-approve`|
|
||||
| `tff` | `terraform fmt` |
|
||||
| `tffr` | `terraform fmt -recursive` |
|
||||
| `tfi` | `terraform init` |
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ alias tfa='terraform apply'
|
|||
alias tfaa='terraform apply -auto-approve'
|
||||
alias tfc='terraform console'
|
||||
alias tfd='terraform destroy'
|
||||
alias 'tfd!'='terraform destroy -auto-approve'
|
||||
alias tff='terraform fmt'
|
||||
alias tffr='terraform fmt -recursive'
|
||||
alias tfi='terraform init'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/zsh
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
# Zsh Theme Chooser by fox (fox91 at anche dot no)
|
||||
# This program is free software. It comes without any warranty, to
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue