Commit ab0f2f9d577352a488e68c3a0f9cf810b2afd034

Authored by mj
1 parent 238d8e65a1
Exists in master and in 2 other branches 02-merge, dev

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

Showing 2 changed files with 7 additions and 13 deletions Side-by-side Diff

plugins/jira/jira.plugin.zsh
... ... @@ -42,13 +42,6 @@ open_jira_issue () {
42 42 $open_cmd "${jira_url}/secure/CreateIssue!default.jspa"
43 43 elif [[ "$1" = "assigned" || "$1" = "reported" ]]; then
44 44 jira_query $@
45   - else
46   - echo "Opening issue #$1"
47   - if [[ "x$JIRA_RAPID_BOARD" = "xtrue" ]]; then
48   - $open_cmd "$jira_url/issues/$jira_prefix$1"
49   - else
50   - $open_cmd "$jira_url/browse/$jira_prefix$1"
51   - fi
52 45 else
53 46 local addcomment=''
54 47 if [[ "$2" == "m" ]]; then
... ... @@ -59,9 +52,9 @@ open_jira_issue () {
59 52 fi
60 53  
61 54 if [[ "x$JIRA_RAPID_BOARD" = "xtrue" ]]; then
62   - $open_cmd "$jira_url/issues/$1$addcomment"
  55 + $open_cmd "$jira_url/issues/$jira_prefix$1$addcomment"
63 56 else
64   - $open_cmd "$jira_url/browse/$1$addcomment"
  57 + $open_cmd "$jira_url/browse/$jira_prefix$1$addcomment"
65 58 fi
66 59 fi
67 60 }
plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
... ... @@ -30,16 +30,17 @@ if [[ "$WORKON_HOME" == "" ]]; then
30 30 fi
31 31  
32 32 if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
33   - # Automatically activate Git projects's virtual environments based on the
  33 + # Automatically activate Git projects' virtual environments based on the
34 34 # directory name of the project. Virtual environment name can be overridden
35 35 # by placing a .venv file in the project root with a virtualenv name in it
36 36 function workon_cwd {
37 37 if [ ! $WORKON_CWD ]; then
38 38 WORKON_CWD=1
39 39 # Check if this is a Git repo
40   - PROJECT_ROOT=`pwd`
  40 + # Get absolute path, resolving symlinks
  41 + PROJECT_ROOT="${PWD:A}"
41 42 while [[ "$PROJECT_ROOT" != "/" && ! -e "$PROJECT_ROOT/.venv" ]]; do
42   - PROJECT_ROOT=`realpath $PROJECT_ROOT/..`
  43 + PROJECT_ROOT="${PROJECT_ROOT:h}"
43 44 done
44 45 if [[ "$PROJECT_ROOT" == "/" ]]; then
45 46 PROJECT_ROOT="."
... ... @@ -50,7 +51,7 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
50 51 elif [[ -f "$PROJECT_ROOT/.venv/bin/activate" ]];then
51 52 ENV_NAME="$PROJECT_ROOT/.venv"
52 53 elif [[ "$PROJECT_ROOT" != "." ]]; then
53   - ENV_NAME=`basename "$PROJECT_ROOT"`
  54 + ENV_NAME="${PROJECT_ROOT:t}"
54 55 else
55 56 ENV_NAME=""
56 57 fi