summaryrefslogtreecommitdiff
path: root/plugins/django/django.plugin.zsh
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2019-11-21 03:29:16 +0100
committerGitHub <noreply@github.com>2019-11-21 03:29:16 +0100
commit1c98b9cc38d34647f1d6357919a0f4e1d5ebd4cd (patch)
treecf629fdfe879eafbbd14350df71556d2179c37a0 /plugins/django/django.plugin.zsh
parentb80b1a1e8b30e5f2a7c4977019cf56e72c434037 (diff)
downloadzsh-1c98b9cc38d34647f1d6357919a0f4e1d5ebd4cd.tar.gz
zsh-1c98b9cc38d34647f1d6357919a0f4e1d5ebd4cd.tar.bz2
zsh-1c98b9cc38d34647f1d6357919a0f4e1d5ebd4cd.zip
Remove current directory from sys.path in python invocations (#8408)
* Remove current directory from sys.path in python invocations
Diffstat (limited to 'plugins/django/django.plugin.zsh')
-rw-r--r--plugins/django/django.plugin.zsh3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/django/django.plugin.zsh b/plugins/django/django.plugin.zsh
index 86558ff2e..c2d00c171 100644
--- a/plugins/django/django.plugin.zsh
+++ b/plugins/django/django.plugin.zsh
@@ -374,7 +374,8 @@ _managepy-commands() {
_applist() {
local line
local -a apps
- _call_program help-command "python -c \"import os.path as op, re, django.conf, sys;\\
+ _call_program help-command "python -c \"import sys; del sys.path[0];\\
+ import os.path as op, re, django.conf;\\
bn=op.basename(op.abspath(op.curdir));[sys\\
.stdout.write(str(re.sub(r'^%s\.(.*?)$' %
bn, r'\1', i)) + '\n') for i in django.conf.settings.\\