Re: [PATCH v4] git-completion.bash: add support for path completion
- From
Manlio Perillo <manlio.perillo@gmail.com>
- Date
- Jan 8, 2013, 18:28 UTC
- Message-ID
- <50EC6558.6080608@gmail.com>
- In-Reply-To
- <20130108180518.GO6440@serenity.lan>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Il 08/01/2013 19:05, John Keeping ha scritto:
Show 14 quoted lines
> [...] >> >> After some searching, I found how this is supposed to be done. >> It is possible to use the -o filenames option to tell Bash completion >> that "the compspec generates filenames, so it can perform any >> filename-specific processing". >> >> Unfortunately this option must be passed to the complete builtin >> command, and we can not do this, since the comspec not always contains >> filenames. > > You should also be able to pass it to 'compopt' during completion in > order to change the behaviour for only the current completion. >
Thanks, compopt is what I wanted.
I was reading an old Bash manual (for Bash 3.1), and compopt is only available starting from Bash 4.0.
I will do some test, being careful to not break the code for Bash < 4.0 and the other supported shells.
Regards Manlio -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAlDsZVgACgkQscQJ24LbaUQlAACdGbhOuGICCYFwkRTPJla+3JGT EcQAoINEGvdwtOz1QFbAA4FqoI3c7VSa =5Oqw -----END PGP SIGNATURE-----