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
16
lib/bzr.zsh
16
lib/bzr.zsh
|
|
@ -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=""
|
||||||
|
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
|
fi
|
||||||
}
|
}
|
||||||
19
lib/cli.zsh
19
lib/cli.zsh
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,13 @@ plugins=(... opentofu)
|
||||||
## Aliases
|
## Aliases
|
||||||
|
|
||||||
| Alias | Command |
|
| Alias | Command |
|
||||||
|--------|-----------------------|
|
|--------|------------------------------|
|
||||||
| `tt` | `tofu` |
|
| `tt` | `tofu` |
|
||||||
| `tta` | `tofu apply` |
|
| `tta` | `tofu apply` |
|
||||||
|
| `ttaa` | `tofu apply -auto-approve` |
|
||||||
| `ttc` | `tofu console` |
|
| `ttc` | `tofu console` |
|
||||||
| `ttd` | `tofu destroy` |
|
| `ttd` | `tofu destroy` |
|
||||||
|
| `ttd!` | `tofu destroy -auto-approve` |
|
||||||
| `ttf` | `tofu fmt` |
|
| `ttf` | `tofu fmt` |
|
||||||
| `ttfr` | `tofu fmt -recursive` |
|
| `ttfr` | `tofu fmt -recursive` |
|
||||||
| `tti` | `tofu init` |
|
| `tti` | `tofu init` |
|
||||||
|
|
|
||||||
|
|
@ -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'
|
||||||
|
|
|
||||||
|
|
@ -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` |
|
||||||
|
|
|
||||||
|
|
@ -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'
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue