mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-10-16 19:50:09 +00:00
Compare commits
4 commits
3e05befaee
...
1d09c6bb0a
Author | SHA1 | Date | |
---|---|---|---|
|
1d09c6bb0a | ||
|
a168efe73e | ||
|
ecc3e9db8a | ||
|
7647c79bae |
78 changed files with 177 additions and 154 deletions
|
@ -16,18 +16,21 @@ This plugin supplies one command, `jira`, through which all its features are exp
|
|||
|
||||
## Commands
|
||||
|
||||
`jira help` or `jira usage` will print the below usage instructions
|
||||
|
||||
| Command | Description |
|
||||
| :------------ | :-------------------------------------------------------- |
|
||||
| `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 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 |
|
||||
| `jira help` | Prints usage instructions |
|
||||
|
||||
|
||||
### Jira Branch usage notes
|
||||
|
|
|
@ -11,6 +11,7 @@ _1st_arguments=(
|
|||
'assigned:search for issues assigned to a user'
|
||||
'branch:open the issue named after the git branch of the current directory'
|
||||
'dumpconfig:display effective jira configuration'
|
||||
'help:print usage help to stdout'
|
||||
)
|
||||
|
||||
_arguments -C \
|
||||
|
|
|
@ -2,6 +2,21 @@
|
|||
#
|
||||
# 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() {
|
||||
emulate -L zsh
|
||||
local action jira_url jira_prefix
|
||||
|
@ -44,6 +59,8 @@ function jira() {
|
|||
open_command "${jira_url}/secure/CreateIssue!default.jspa"
|
||||
elif [[ "$action" == "assigned" || "$action" == "reported" ]]; then
|
||||
_jira_query ${@:-$action}
|
||||
elif [[ "$action" == "help" || "$action" == "usage" ]]; then
|
||||
_jira_usage
|
||||
elif [[ "$action" == "mine" ]]; then
|
||||
echo "Opening my issues"
|
||||
open_command "${jira_url}/issues/?filter=-1"
|
||||
|
|
|
@ -14,10 +14,10 @@ _togglePoetryShell() {
|
|||
# activate the environment if pyproject.toml exists
|
||||
if [[ "$poetry_active" != 1 ]]; 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_dir="$PWD"
|
||||
source "$(poetry env info --path)/bin/activate"
|
||||
source "${venv_dir}/bin/activate"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -15,19 +15,20 @@ plugins=(... terraform)
|
|||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command |
|
||||
| ----- | -------------------- |
|
||||
| `tf` | `terraform` |
|
||||
| `tfa` | `terraform apply` |
|
||||
| `tfc` | `terraform console` |
|
||||
| `tfd` | `terraform destroy` |
|
||||
| `tff` | `terraform fmt` |
|
||||
| `tfi` | `terraform init` |
|
||||
| `tfo` | `terraform output` |
|
||||
| `tfp` | `terraform plan` |
|
||||
| `tfv` | `terraform validate` |
|
||||
| `tfs` | `terraform state` |
|
||||
| `tfsh`| `terraform show` |
|
||||
| Alias | Command |
|
||||
| ------ | -------------------- |
|
||||
| `tf` | `terraform` |
|
||||
| `tfa` | `terraform apply` |
|
||||
| `tfc` | `terraform console` |
|
||||
| `tfd` | `terraform destroy` |
|
||||
| `tff` | `terraform fmt` |
|
||||
| `tfi` | `terraform init` |
|
||||
| `tfo` | `terraform output` |
|
||||
| `tfp` | `terraform plan` |
|
||||
| `tfv` | `terraform validate` |
|
||||
| `tfs` | `terraform state` |
|
||||
| `tft` | `terraform test` |
|
||||
| `tfsh` | `terraform show` |
|
||||
|
||||
|
||||
## Prompt function
|
||||
|
|
|
@ -25,4 +25,5 @@ alias tfo='terraform output'
|
|||
alias tfp='terraform plan'
|
||||
alias tfv='terraform validate'
|
||||
alias tfs='terraform state'
|
||||
alias tft='terraform test'
|
||||
alias tfsh='terraform show'
|
||||
|
|
Loading…
Reference in a new issue