Re: ZSH segmentation fault while completing "git mv dir/"

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: ZSH segmentation fault while completing "git mv dir/"

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:56:36

Felipe Contreras [off-list ref] writes:
quoted hunk
And this is a workaround:
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -66,7 +66,7 @@ __gitcomp_file ()

        local IFS=$'\n'
        compset -P '*[=:]'
-       compadd -Q -p "${2-}" -f -- ${=1} && _ret=0
+       compadd -Q -p "${2-}" -- ${=1} && _ret=0
 }
OK, not something we want to apply to git.git, but this means a
workaround for users is to create a _git file with this content instead
instead of copying/symlinking git-completion.zsh as _git (replace
$GIT_ROOT_PATH with the appropriate value):

. $GIT_ROOT_PATH/contrib/completion/git-completion.zsh

# Work around ZSH bug on zsh 4.3.10-dev-1-cvs0720, which segfaults
# when completing "git mv subdir/<tab>" by redefining __gitcomp_file
__gitcomp_file ()
{
	emulate -L zsh

	local IFS=$'\n'
	compset -P '*[=:]'
	# The original had a -f here to indicate file completion.
	compadd -Q -p "${2-}" -- ${=1} && _ret=0
}

(Hope this helps in case someone has the same problem and finds this
thread ...)

Thanks,

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

Re: ZSH segmentation fault while completing "git mv dir/"

From: Manlio Perillo <hidden>
Date: 2016-06-15 22:56:37

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Il 02/04/2013 16:32, Matthieu Moy ha scritto:
Felipe Contreras [off-list ref] writes:
quoted
And this is a workaround:
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -66,7 +66,7 @@ __gitcomp_file ()

        local IFS=$'\n'
        compset -P '*[=:]'
-       compadd -Q -p "${2-}" -f -- ${=1} && _ret=0
+       compadd -Q -p "${2-}" -- ${=1} && _ret=0
 }
OK, not something we want to apply to git.git, but this means a
workaround for users is to create a _git file with this content instead
instead of copying/symlinking git-completion.zsh as _git (replace
$GIT_ROOT_PATH with the appropriate value)
By the way: have you filled a bug report to Debian?


Regards  Manlio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlFbRasACgkQscQJ24LbaUTDZQCfbfF5yhxCfUSaWdv0pE7++X3l
Lc0AniAw5lEL6iunM+Tw8HvYxGwjuYYh
=KpQI
-----END PGP SIGNATURE-----
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help