Skip to content

Commit f7535e5

Browse files
authored
Merge pull request #13 from przepompownia/fix-composer-remove-completion
Add missing setting COMPOSER_CWD in shell environment
2 parents 8150813 + 5cbd557 commit f7535e5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

hooks/bash-completion

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ function _composercomplete {
55
local CMDLINE_CONTENTS="$COMP_LINE"
66
local CMDLINE_CURSOR_INDEX="$COMP_POINT"
77
local CMDLINE_WORDBREAKS="$COMP_WORDBREAKS";
8+
local COMPOSER_CWD="$PWD"
89

9-
export CMDLINE_CONTENTS CMDLINE_CURSOR_INDEX CMDLINE_WORDBREAKS
10+
export CMDLINE_CONTENTS CMDLINE_CURSOR_INDEX CMDLINE_WORDBREAKS COMPOSER_CWD
1011

1112
# Query and cache where the global composer.json lives
1213
if [ -z "$_composer_config_dir" ]; then

hooks/zsh-completion

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
function _composer {
55
local -x CMDLINE_CONTENTS="$words"
66
local -x CMDLINE_CURSOR_INDEX
7+
local -x COMPOSER_CWD="$PWD"
78
(( CMDLINE_CURSOR_INDEX = ${#${(j. .)words[1,CURRENT]}} ))
89

910
# Query and cache where the global composer.json lives

0 commit comments

Comments
 (0)