mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-19 00:37:35 +08:00
Compare commits
No commits in common. "b721053c87b4662c65452117a8db35af0154a29d" and "cfdd3c8dd87cd22281ec5d964ecb915bc9ad7e92" have entirely different histories.
b721053c87
...
cfdd3c8dd8
@ -36,4 +36,5 @@ setopt hist_expire_dups_first # delete duplicates first when HISTFILE size excee
|
||||
setopt hist_ignore_dups # ignore duplicated commands history list
|
||||
setopt hist_ignore_space # ignore commands that start with space
|
||||
setopt hist_verify # show command with history expansion to user before running it
|
||||
setopt inc_append_history # add commands to HISTFILE in order of execution
|
||||
setopt share_history # share command history data
|
||||
|
||||
@ -22,7 +22,7 @@ plugins=(... git)
|
||||
| gb | git branch |
|
||||
| gba | git branch -a |
|
||||
| gbd | git branch -d |
|
||||
| gbda | git branch --no-color --merged \| command grep -vE "^(\+\|\*\|\s*(master\|development\|develop\|dev)\s*$)" \| command xargs -n 1 git branch -d |
|
||||
| gbda | git branch --no-color --merged \| command grep -vE "^(\+\|\*\|\s*(master\|develop\|dev)\s*$)" \| command xargs -n 1 git branch -d |
|
||||
| gbD | git branch -D |
|
||||
| gbl | git blame -b -w |
|
||||
| gbnm | git branch --no-merged |
|
||||
|
||||
@ -42,7 +42,7 @@ alias gap='git apply'
|
||||
alias gb='git branch'
|
||||
alias gba='git branch -a'
|
||||
alias gbd='git branch -d'
|
||||
alias gbda='git branch --no-color --merged | command grep -vE "^(\+|\*|\s*(master|development|develop|dev)\s*$)" | command xargs -n 1 git branch -d'
|
||||
alias gbda='git branch --no-color --merged | command grep -vE "^(\+|\*|\s*(master|develop|dev)\s*$)" | command xargs -n 1 git branch -d'
|
||||
alias gbD='git branch -D'
|
||||
alias gbl='git blame -b -w'
|
||||
alias gbnm='git branch --no-merged'
|
||||
|
||||
@ -19,7 +19,6 @@ jira # performs the default action
|
||||
|
||||
jira new # opens a new issue
|
||||
jira dashboard # opens your JIRA dashboard
|
||||
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 myissues # queries for you own issues
|
||||
|
||||
@ -5,7 +5,6 @@ local -a _1st_arguments
|
||||
_1st_arguments=(
|
||||
'new:create a new issue'
|
||||
'dashboard:open the dashboard'
|
||||
'tempo:open the tempo'
|
||||
'reported:search for issues reported by a user'
|
||||
'assigned:search for issues assigned to a user'
|
||||
'branch:open the issue named after the git branch of the current directory'
|
||||
|
||||
@ -54,9 +54,6 @@ function jira() {
|
||||
else
|
||||
open_command "${jira_url}/secure/Dashboard.jspa"
|
||||
fi
|
||||
elif [[ "$action" == "tempo" ]]; then
|
||||
echo "Opening tempo"
|
||||
open_command "${jira_url}/secure/Tempo.jspa"
|
||||
elif [[ "$action" == "dumpconfig" ]]; then
|
||||
echo "JIRA_URL=$jira_url"
|
||||
echo "JIRA_PREFIX=$jira_prefix"
|
||||
|
||||
@ -16,22 +16,16 @@ man-command-line() {
|
||||
# if there is no command typed, use the last command
|
||||
[[ -z "$BUFFER" ]] && zle up-history
|
||||
|
||||
# if typed command begins with man, do nothing
|
||||
[[ "$BUFFER" = man\ * ]] && return
|
||||
|
||||
# get command and possible subcommand
|
||||
# prepend man to only the first part of the typed command
|
||||
# http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion-Flags
|
||||
local -a args
|
||||
args=(${${(Az)BUFFER}[1]} ${${(Az)BUFFER}[2]})
|
||||
|
||||
# check if man page exists for command and first argument
|
||||
if man "${args[1]}-${args[2]}" >/dev/null 2>&1; then
|
||||
BUFFER="man $args"
|
||||
else
|
||||
BUFFER="man ${args[1]}"
|
||||
fi
|
||||
[[ "$BUFFER" != man\ * ]] && BUFFER="man ${${(Az)BUFFER}[1]}"
|
||||
}
|
||||
|
||||
zle -N man-command-line
|
||||
# Defined shortcut keys: [Esc]man
|
||||
bindkey "\e"man man-command-line
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Also, you might want to use man-preview included in 'osx' plugin
|
||||
# just substitute "man" in the function with "man-preview" after you included OS X in
|
||||
# the .zshrc
|
||||
|
||||
@ -7,7 +7,7 @@ compdef _pipenv pipenv
|
||||
# Automatic pipenv shell activation/deactivation
|
||||
_togglePipenvShell() {
|
||||
# deactivate shell if Pipfile doesn't exist and not in a subdir
|
||||
if [[ ! -f "$PWD/Pipfile" ]]; then
|
||||
if [[ ! -a "$PWD/Pipfile" ]]; then
|
||||
if [[ "$PIPENV_ACTIVE" == 1 ]]; then
|
||||
if [[ "$PWD" != "$pipfile_dir"* ]]; then
|
||||
exit
|
||||
@ -17,7 +17,7 @@ _togglePipenvShell() {
|
||||
|
||||
# activate the shell if Pipfile exists
|
||||
if [[ "$PIPENV_ACTIVE" != 1 ]]; then
|
||||
if [[ -f "$PWD/Pipfile" ]]; then
|
||||
if [[ -a "$PWD/Pipfile" ]]; then
|
||||
export pipfile_dir="$PWD"
|
||||
pipenv shell
|
||||
fi
|
||||
|
||||
@ -10,14 +10,9 @@ typeset +H my_orange="$FG[214]"
|
||||
|
||||
# separator dashes size
|
||||
function afmagic_dashes {
|
||||
local PYTHON_ENV="$VIRTUAL_ENV"
|
||||
[[ -z "$PYTHON_ENV" ]] && PYTHON_ENV="$CONDA_DEFAULT_ENV"
|
||||
|
||||
if [[ -n "$PYTHON_ENV" && "$PS1" = \(* ]]; then
|
||||
echo $(( COLUMNS - ${#PYTHON_ENV} - 3 ))
|
||||
else
|
||||
echo $COLUMNS
|
||||
fi
|
||||
[[ -n "${VIRTUAL_ENV-}" && -z "${VIRTUAL_ENV_DISABLE_PROMPT-}" && "$PS1" = \(* ]] \
|
||||
&& echo $(( COLUMNS - ${#VIRTUAL_ENV} - 3 )) \
|
||||
|| echo $COLUMNS
|
||||
}
|
||||
|
||||
# primary prompt
|
||||
|
||||
Loading…
Reference in New Issue
Block a user