mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-06 02:51:32 +01:00
Merge branch 'ohmyzsh:master' into omz-subexecutor
This commit is contained in:
commit
a80c6ea4e4
83 changed files with 189 additions and 160 deletions
|
|
@ -9,6 +9,7 @@ if [[ -z "${CLOUDSDK_HOME}" ]]; then
|
||||||
"/usr/local/share/google-cloud-sdk"
|
"/usr/local/share/google-cloud-sdk"
|
||||||
"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk"
|
"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk"
|
||||||
"/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk"
|
"/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk"
|
||||||
|
"/opt/homebrew/share/google-cloud-sdk"
|
||||||
"/usr/share/google-cloud-sdk"
|
"/usr/share/google-cloud-sdk"
|
||||||
"/snap/google-cloud-sdk/current"
|
"/snap/google-cloud-sdk/current"
|
||||||
"/snap/google-cloud-cli/current"
|
"/snap/google-cloud-cli/current"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#compdef http
|
#compdef http https
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Copyright (c) 2015 GitHub zsh-users - http://github.com/zsh-users
|
# Copyright (c) 2015 GitHub zsh-users - http://github.com/zsh-users
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
|
|
|
||||||
|
|
@ -16,18 +16,21 @@ This plugin supplies one command, `jira`, through which all its features are exp
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
|
`jira help` or `jira usage` will print the below usage instructions
|
||||||
|
|
||||||
| Command | Description |
|
| Command | Description |
|
||||||
| :------------ | :-------------------------------------------------------- |
|
| :------------ | :-------------------------------------------------------- |
|
||||||
| `jira` | Performs the default action |
|
| `jira` | Performs the default action |
|
||||||
| `jira new` | Opens a new Jira issue dialogue |
|
| `jira new` | Opens a new Jira issue dialogue |
|
||||||
| `jira ABC-123` | Opens an existing issue |
|
| `jira ABC-123` | Opens an existing issue |
|
||||||
| `jira ABC-123 m` | Opens an existing issue for adding a comment |
|
| `jira ABC-123 m` | Opens an existing issue for adding a comment |
|
||||||
| `jira dashboard [rapid_view]` | # opens your JIRA dashboard |
|
| `jira dashboard [rapid_view]` | Opens your JIRA dashboard |
|
||||||
| `jira mine` | Queries for your own issues |
|
| `jira mine` | Queries for your own issues |
|
||||||
| `jira tempo` | Opens your JIRA Tempo |
|
| `jira tempo` | Opens your JIRA Tempo |
|
||||||
| `jira reported [username]` | Queries for issues reported by a user |
|
| `jira reported [username]` | Queries for issues reported by a user |
|
||||||
| `jira assigned [username]` | Queries for issues assigned to a user |
|
| `jira assigned [username]` | Queries for issues assigned to a user |
|
||||||
| `jira branch` | Opens an existing issue matching the current branch name |
|
| `jira branch` | Opens an existing issue matching the current branch name |
|
||||||
|
| `jira help` | Prints usage instructions |
|
||||||
|
|
||||||
|
|
||||||
### Jira Branch usage notes
|
### Jira Branch usage notes
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ _1st_arguments=(
|
||||||
'assigned:search for issues assigned to a user'
|
'assigned:search for issues assigned to a user'
|
||||||
'branch:open the issue named after the git branch of the current directory'
|
'branch:open the issue named after the git branch of the current directory'
|
||||||
'dumpconfig:display effective jira configuration'
|
'dumpconfig:display effective jira configuration'
|
||||||
|
'help:print usage help to stdout'
|
||||||
)
|
)
|
||||||
|
|
||||||
_arguments -C \
|
_arguments -C \
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,21 @@
|
||||||
#
|
#
|
||||||
# See README.md for details
|
# See README.md for details
|
||||||
|
|
||||||
|
function _jira_usage() {
|
||||||
|
cat <<EOF
|
||||||
|
jira Performs the default action
|
||||||
|
jira new Opens a new Jira issue dialogue
|
||||||
|
jira ABC-123 Opens an existing issue
|
||||||
|
jira ABC-123 m Opens an existing issue for adding a comment
|
||||||
|
jira dashboard [rapid_view] Opens your JIRA dashboard
|
||||||
|
jira mine Queries for your own issues
|
||||||
|
jira tempo Opens your JIRA Tempo
|
||||||
|
jira reported [username] Queries for issues reported by a user
|
||||||
|
jira assigned [username] Queries for issues assigned to a user
|
||||||
|
jira branch Opens an existing issue matching the current branch name
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
function jira() {
|
function jira() {
|
||||||
emulate -L zsh
|
emulate -L zsh
|
||||||
local action jira_url jira_prefix
|
local action jira_url jira_prefix
|
||||||
|
|
@ -44,6 +59,8 @@ function jira() {
|
||||||
open_command "${jira_url}/secure/CreateIssue!default.jspa"
|
open_command "${jira_url}/secure/CreateIssue!default.jspa"
|
||||||
elif [[ "$action" == "assigned" || "$action" == "reported" ]]; then
|
elif [[ "$action" == "assigned" || "$action" == "reported" ]]; then
|
||||||
_jira_query ${@:-$action}
|
_jira_query ${@:-$action}
|
||||||
|
elif [[ "$action" == "help" || "$action" == "usage" ]]; then
|
||||||
|
_jira_usage
|
||||||
elif [[ "$action" == "mine" ]]; then
|
elif [[ "$action" == "mine" ]]; then
|
||||||
echo "Opening my issues"
|
echo "Opening my issues"
|
||||||
open_command "${jira_url}/issues/?filter=-1"
|
open_command "${jira_url}/issues/?filter=-1"
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,9 @@ fi
|
||||||
# Load mise hooks
|
# Load mise hooks
|
||||||
eval "$($__mise activate zsh)"
|
eval "$($__mise activate zsh)"
|
||||||
|
|
||||||
|
# Hook mise into current environment
|
||||||
|
eval "$($__mise hook-env -s zsh)"
|
||||||
|
|
||||||
# If the completion file doesn't exist yet, we need to autoload it and
|
# If the completion file doesn't exist yet, we need to autoload it and
|
||||||
# bind it to `mise`. Otherwise, compinit will have already done that.
|
# bind it to `mise`. Otherwise, compinit will have already done that.
|
||||||
if [[ ! -f "$ZSH_CACHE_DIR/completions/_$__mise" ]]; then
|
if [[ ! -f "$ZSH_CACHE_DIR/completions/_$__mise" ]]; then
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,10 @@ _togglePoetryShell() {
|
||||||
# activate the environment if pyproject.toml exists
|
# activate the environment if pyproject.toml exists
|
||||||
if [[ "$poetry_active" != 1 ]]; then
|
if [[ "$poetry_active" != 1 ]]; then
|
||||||
if [[ -f "$PWD/pyproject.toml" ]]; then
|
if [[ -f "$PWD/pyproject.toml" ]]; then
|
||||||
if grep -q 'tool.poetry' "$PWD/pyproject.toml"; then
|
if grep -q 'tool.poetry' "$PWD/pyproject.toml" && venv_dir=$(poetry env info --path); then
|
||||||
export poetry_active=1
|
export poetry_active=1
|
||||||
export poetry_dir="$PWD"
|
export poetry_dir="$PWD"
|
||||||
source "$(poetry env info --path)/bin/activate"
|
source "${venv_dir}/bin/activate"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -98,8 +98,10 @@ function _add_identities() {
|
||||||
|
|
||||||
# Add a nifty symlink for screen/tmux if agent forwarding is enabled
|
# Add a nifty symlink for screen/tmux if agent forwarding is enabled
|
||||||
if zstyle -t :omz:plugins:ssh-agent agent-forwarding \
|
if zstyle -t :omz:plugins:ssh-agent agent-forwarding \
|
||||||
&& [[ -n "$SSH_AUTH_SOCK" && ! -L "$SSH_AUTH_SOCK" ]]; then
|
&& [[ -n "$SSH_AUTH_SOCK" ]]; then
|
||||||
ln -sf "$SSH_AUTH_SOCK" /tmp/ssh-agent-$USERNAME-screen
|
if [[ ! -L "$SSH_AUTH_SOCK" ]]; then
|
||||||
|
ln -sf "$SSH_AUTH_SOCK" /tmp/ssh-agent-$USERNAME-screen
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
_start_agent
|
_start_agent
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# ignore oh-my-zsh theme
|
|
||||||
unset ZSH_THEME
|
|
||||||
|
|
||||||
if (( $+commands[starship] )); then
|
if (( $+commands[starship] )); then
|
||||||
|
# ignore oh-my-zsh theme
|
||||||
|
unset ZSH_THEME
|
||||||
|
|
||||||
eval "$(starship init zsh)"
|
eval "$(starship init zsh)"
|
||||||
else
|
else
|
||||||
echo '[oh-my-zsh] starship not found, please install it from https://starship.rs'
|
echo '[oh-my-zsh] starship not found, please install it from https://starship.rs'
|
||||||
|
|
|
||||||
|
|
@ -15,19 +15,20 @@ plugins=(... terraform)
|
||||||
|
|
||||||
## Aliases
|
## Aliases
|
||||||
|
|
||||||
| Alias | Command |
|
| Alias | Command |
|
||||||
| ----- | -------------------- |
|
| ------ | -------------------- |
|
||||||
| `tf` | `terraform` |
|
| `tf` | `terraform` |
|
||||||
| `tfa` | `terraform apply` |
|
| `tfa` | `terraform apply` |
|
||||||
| `tfc` | `terraform console` |
|
| `tfc` | `terraform console` |
|
||||||
| `tfd` | `terraform destroy` |
|
| `tfd` | `terraform destroy` |
|
||||||
| `tff` | `terraform fmt` |
|
| `tff` | `terraform fmt` |
|
||||||
| `tfi` | `terraform init` |
|
| `tfi` | `terraform init` |
|
||||||
| `tfo` | `terraform output` |
|
| `tfo` | `terraform output` |
|
||||||
| `tfp` | `terraform plan` |
|
| `tfp` | `terraform plan` |
|
||||||
| `tfv` | `terraform validate` |
|
| `tfv` | `terraform validate` |
|
||||||
| `tfs` | `terraform state` |
|
| `tfs` | `terraform state` |
|
||||||
| `tfsh`| `terraform show` |
|
| `tft` | `terraform test` |
|
||||||
|
| `tfsh` | `terraform show` |
|
||||||
|
|
||||||
|
|
||||||
## Prompt function
|
## Prompt function
|
||||||
|
|
|
||||||
|
|
@ -25,4 +25,5 @@ alias tfo='terraform output'
|
||||||
alias tfp='terraform plan'
|
alias tfp='terraform plan'
|
||||||
alias tfv='terraform validate'
|
alias tfv='terraform validate'
|
||||||
alias tfs='terraform state'
|
alias tfs='terraform state'
|
||||||
|
alias tft='terraform test'
|
||||||
alias tfsh='terraform show'
|
alias tfsh='terraform show'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue