From ab0f2f9d577352a488e68c3a0f9cf810b2afd034 Mon Sep 17 00:00:00 2001 From: mj Date: Tue, 14 Jul 2015 23:38:22 +0200 Subject: [PATCH] Squashed 'repos/robbyrussell/oh-my-zsh/' changes from 599831b..3ea3384 3ea3384 Merge pull request #4041 from apjanke/fix-jira-prefix-comment-merge c968346 Merge pull request #4106 from apjanke/venvw-no-realpath c1f1f91 virtualenvwrapper: Replace "realpath" with portable zsh-native `:A` and `:h` modifiers d0670aa Fix merge conflict for jira-prefix and jira add comment git-subtree-dir: repos/robbyrussell/oh-my-zsh git-subtree-split: 3ea33841863c4f5f22a27e64ae7950d901b674af --- plugins/jira/jira.plugin.zsh | 11 ++--------- plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh | 9 +++++---- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index 8ad60b8..ca540c8 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -42,13 +42,6 @@ open_jira_issue () { $open_cmd "${jira_url}/secure/CreateIssue!default.jspa" elif [[ "$1" = "assigned" || "$1" = "reported" ]]; then jira_query $@ - else - echo "Opening issue #$1" - if [[ "x$JIRA_RAPID_BOARD" = "xtrue" ]]; then - $open_cmd "$jira_url/issues/$jira_prefix$1" - else - $open_cmd "$jira_url/browse/$jira_prefix$1" - fi else local addcomment='' if [[ "$2" == "m" ]]; then @@ -59,9 +52,9 @@ open_jira_issue () { fi if [[ "x$JIRA_RAPID_BOARD" = "xtrue" ]]; then - $open_cmd "$jira_url/issues/$1$addcomment" + $open_cmd "$jira_url/issues/$jira_prefix$1$addcomment" else - $open_cmd "$jira_url/browse/$1$addcomment" + $open_cmd "$jira_url/browse/$jira_prefix$1$addcomment" fi fi } diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh index 9fd0d3d..f5f37ff 100644 --- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh +++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh @@ -30,16 +30,17 @@ if [[ "$WORKON_HOME" == "" ]]; then fi if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then - # Automatically activate Git projects's virtual environments based on the + # Automatically activate Git projects' virtual environments based on the # directory name of the project. Virtual environment name can be overridden # by placing a .venv file in the project root with a virtualenv name in it function workon_cwd { if [ ! $WORKON_CWD ]; then WORKON_CWD=1 # Check if this is a Git repo - PROJECT_ROOT=`pwd` + # Get absolute path, resolving symlinks + PROJECT_ROOT="${PWD:A}" while [[ "$PROJECT_ROOT" != "/" && ! -e "$PROJECT_ROOT/.venv" ]]; do - PROJECT_ROOT=`realpath $PROJECT_ROOT/..` + PROJECT_ROOT="${PROJECT_ROOT:h}" done if [[ "$PROJECT_ROOT" == "/" ]]; then PROJECT_ROOT="." @@ -50,7 +51,7 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then elif [[ -f "$PROJECT_ROOT/.venv/bin/activate" ]];then ENV_NAME="$PROJECT_ROOT/.venv" elif [[ "$PROJECT_ROOT" != "." ]]; then - ENV_NAME=`basename "$PROJECT_ROOT"` + ENV_NAME="${PROJECT_ROOT:t}" else ENV_NAME="" fi -- 2.0.0