Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
a7efd96a
Unverified
Commit
a7efd96a
authored
Jan 19, 2022
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(dotenv): match for exact directory path in allowed/disallowed files
parent
0b08b70b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
dotenv.plugin.zsh
plugins/dotenv/dotenv.plugin.zsh
+2
-2
No files found.
plugins/dotenv/dotenv.plugin.zsh
View file @
a7efd96a
...
@@ -23,12 +23,12 @@ source_env() {
...
@@ -23,12 +23,12 @@ source_env() {
touch
"
$ZSH_DOTENV_DISALLOWED_LIST
"
touch
"
$ZSH_DOTENV_DISALLOWED_LIST
"
# early return if disallowed
# early return if disallowed
if
command grep
-q
"
$dirpath
"
"
$ZSH_DOTENV_DISALLOWED_LIST
"
&>/dev/null
;
then
if
command grep
-
Fx
-
q
"
$dirpath
"
"
$ZSH_DOTENV_DISALLOWED_LIST
"
&>/dev/null
;
then
return
return
fi
fi
# check if current directory's .env file is allowed or ask for confirmation
# check if current directory's .env file is allowed or ask for confirmation
if
!
command grep
-q
"
$dirpath
"
"
$ZSH_DOTENV_ALLOWED_LIST
"
&>/dev/null
;
then
if
!
command grep
-
Fx
-
q
"
$dirpath
"
"
$ZSH_DOTENV_ALLOWED_LIST
"
&>/dev/null
;
then
# get cursor column and print new line before prompt if not at line beginning
# get cursor column and print new line before prompt if not at line beginning
local
column
local
column
echo
-ne
"
\e
[6n"
>
/dev/tty
echo
-ne
"
\e
[6n"
>
/dev/tty
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment