[Bash-completion-devel] Bug#668973: Bug#668973: bash-completion: completion for ls misses the --full-time option

2012-04-21 Thread Ville Skyttä
On 2012-04-16 11:16, Paul Wise wrote: AFAICT the completion for ls misses the --full-time option: It does indeed. The line where --full-time is in --help output trips our _longopt function: $ echo --full-timelike -l --time-style=full-iso \ | sed -ne

[Bash-completion-devel] Bug#666933: Bug#666933: Enabling nullglob breaks file/directory completion

2012-04-03 Thread Ville Skyttä
On 04/02/2012 08:46 PM, Shalom Bhooshi wrote: If nullglob option is enabled in the shell (via `shopt -s nullglob') the completion of files/directories for commands such as `ls', `cd', etc fail - this is because the various completion functions inherit this setting from the shell and do not make

Re: [Bash-completion-devel] How to force loading of a command completion ?

2012-03-14 Thread Ville Skyttä
On 2012-03-14 20:51, Guillaume Rousse wrote: I need to force rpm completion file loading, from another completion function (urpme), as it relies on one of the function defined there (_rpm_installed_packages). How can I achieve that ? Prepending _xfunc rpm to your _rpm_installed_packages

[Bash-completion-devel] Bug#662203: Bug#662203: overrides lyx's bash-completion

2012-03-11 Thread Ville Skyttä
On 2012-03-04 19:07, Per Olofsson wrote: _install_xspec '!*.lyx' lyx Please remove that line so that the custom completion script is used instead. (The custom script has more features.) Thanks. Done upstream. ___ Bash-completion-devel mailing

Re: [Bash-completion-devel] 'git flow' Completions

2012-01-19 Thread Ville Skyttä
On 2012-01-19 03:21, Igor Murzov wrote: Completion for the `git flow` as I can see relies on completion for `git`. And we don't provide completion for `git`, so we'll need to add it first. And then we'll need maintainer for this completion as git is constantly evolving. Completion for git is

Re: [Bash-completion-devel] [PATCH] _filedir: Properly quote paths.

2012-01-18 Thread Ville Skyttä
On 2012-01-18 16:29, Igor Murzov wrote: Can somebody review this patch and run test/runUnit with the patch applied? The patch needs to be tested with bash-4.2 and I don't have one. This patch fixes following test case for me: $ mkdir test $ cd test $ touch 'x' '[x]' $ ls [xTAB # -

Re: [Bash-completion-devel] Bug with key=value options?

2012-01-08 Thread Ville Skyttä
On 2012-01-08 14:43, David Paleino wrote: Hello people, please consider the following snippet: ---8--- _foo() { local cur prev words cword _init_completion -n = || return case $cur in bar=*) cur=${cur#*=} _filedir return 0

Re: [Bash-completion-devel] New beta/rc release?

2012-01-04 Thread Ville Skyttä
On 2012-01-04 11:55, David Paleino wrote: Is everybody ok with tagging that commit (3ccfe02) as 2.0rc1 ? Fine with me. ___ Bash-completion-devel mailing list Bash-completion-devel@lists.alioth.debian.org

Re: [Bash-completion-devel] bash completion fails if shopt nullglob is set, repro info follows

2011-12-26 Thread Ville Skyttä
On 2011-12-20 12:49, C. Alex. North-Keys wrote: Anyone using shopt -s nullglob, the entire autocompletion is horribly broken, essentially useless in many contexts, nullglob added to roadmap for 3.0. http://wiki.debian.org/Teams/BashCompletion/Proposals/Roadmap along with the resulting

[Bash-completion-devel] New beta/rc release? (was: Re: robustness: var=$(cmd1) cmd2 -tab)

2011-12-14 Thread Ville Skyttä
On 12/14/2011 07:13 PM, Igor Murzov wrote: I'm having a hard time believing that it's really this hard to get stuff to work, are we doing something wrong? There must be a cleaner way. I think we made some good progress with bash-completion and it is much more usable now then ever before.

Re: [Bash-completion-devel] New beta/rc release?

2011-12-14 Thread Ville Skyttä
On 12/14/2011 10:06 PM, David Paleino wrote: On Wed, 14 Dec 2011 21:58:05 +0200, Ville Skyttä wrote: +1 for another 1.9x release. David? Here! o/ I can make a 1.91 whenever you wish; just tell me which commit to use. The last one in my repo is a229ea46e701af1c8d55ae44bb61b025af00ec1e

Re: [Bash-completion-devel] New beta/rc release?

2011-12-14 Thread Ville Skyttä
On 12/14/2011 11:16 PM, David Paleino wrote: On Thu, 15 Dec 2011 00:56:42 +0400, Igor Murzov wrote: I think we should concentrate on the stable release now and probably make one more beta or rc1 for 2.0 release +1 for another 1.9x release. David? Is there any guidelines on how to prepare

Re: [Bash-completion-devel] robustness: var=$(cmd1) cmd2 -tab

2011-12-12 Thread Ville Skyttä
On 12/11/2011 10:48 PM, Raphaël Droz wrote: Just found the following bug: $ var=$(id) find -tab bash: eval: line1: syntax error near unexpected « ) » bash: eval: line1: `local cmd=id)' I managed to reproduce this, but only when the completion for id has been already loaded. There is a bug

Re: [Bash-completion-devel] typo/enhancements for styleguide.txt

2011-12-11 Thread Ville Skyttä
On 12/11/2011 08:35 PM, Raphaël wrote: this attempts to explain why $split return Reworded and expanded explanation added in git. ___ Bash-completion-devel mailing list Bash-completion-devel@lists.alioth.debian.org

Re: [Bash-completion-devel] ~/.bash_history completion

2011-12-10 Thread Ville Skyttä
On 12/07/2011 10:14 PM, Maciej Ciemborowicz wrote: Is there a known way of completing commands from ~/.bash_history? Not that I know of, but I believe it would be fairly easy to write such a completion function. My first thought is that it's probably not something we want to do in

[Bash-completion-devel] Bug#650514: Bug#650514: bash-completion: ssh host completion cannot deal with multiple files in UserKnownHostsFile

2011-12-05 Thread Ville Skyttä
Fixed upstream: http://anonscm.debian.org/gitweb/?p=bash-completion/bash-completion.git;a=commitdiff;h=17c9722 ___ Bash-completion-devel mailing list Bash-completion-devel@lists.alioth.debian.org

Re: [Bash-completion-devel] typo/enhancements for styleguide.txt

2011-12-04 Thread Ville Skyttä
On 12/04/2011 08:49 PM, Raphaël Droz wrote: 0001-Typo-in-doc-styleguide.txt.patch -#91;[ ]] vs [ ] +[[ ]] vs [ ] This is incorrect, it breaks the asciidoc build: $ ./makeHtml.sh FAILED: styleguide.txt: line 30: illegal style name: [ ]] vs [ a2x: failed: asciidoc --doctype=book --unsafe -b

Re: [Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.90-50-g834379e

2011-11-24 Thread Ville Skyttä
On 11/24/2011 03:57 AM, Igor Murzov wrote: I wrote the code for that purpose. It finds an offset for the $words array at first and then translates found value to an offset for the $COMP_WORDS. Here it is: Yeah, I suppose for valgrind it might work after all (even though the code looks

Re: [Bash-completion-devel] Always using [[ instead of [

2011-11-20 Thread Ville Skyttä
On 11/20/2011 03:28 AM, Igor Murzov wrote: That's not true. Double brackets still need quotes: -- $ x=a\ b $ y=a\ bc $ [[ $y == $x* ]] echo [$x] is prefix of [$y] $ [[ $y == $x* ]] echo [$x] is prefix of [$y] [a\ b] is prefix of [a\ bc]

Re: [Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.90-50-g834379e

2011-11-20 Thread Ville Skyttä
On 11/20/2011 12:05 PM, Ville Skyttä wrote: On 11/20/2011 02:45 AM, Igor Murzov wrote: What about something like this?: -- $ for f in /usr{,/local}/lib{,64}/valgrind/*; do [[ -x $f $f != *.so ]] echo $f | sed -ne 's

Re: [Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.90-54-gf0283e1

2011-11-20 Thread Ville Skyttä
On 11/20/2011 03:14 PM, Igor Murzov wrote: The following commit has been merged in the master branch: commit f0283e1c1b64202bb1adb9f44eac6fdfd80edece Author: Igor Murzov e-m...@date.by Date: Sun Nov 20 17:00:03 2011 +0300 Cleanups: Make code more compact. Drop useless

Re: [Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.90-54-gf0283e1

2011-11-20 Thread Ville Skyttä
On 11/20/2011 06:47 PM, Igor Murzov wrote: On Sun, 20 Nov 2011 16:39:54 +0200 Ville Skyttä ville.sky...@iki.fi wrote: BTW I believe we've until now used pretty consistently $( foo ) instead of $(foo) but this commit introduces a bunch of the latter, making things somewhat less consistent wrt

Re: [Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.90-59-g2932491

2011-11-20 Thread Ville Skyttä
On 11/20/2011 08:07 PM, Ville Skyttä wrote: The following commit has been merged in the master branch: commit 2932491a2c1ec611194d55a9390b708a32403b35 Author: Ville Skyttä ville.sky...@iki.fi Date: Sun Nov 20 20:01:13 2011 +0200 dict: Speed up word completion with common use cases

Re: [Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.90-50-g834379e

2011-11-17 Thread Ville Skyttä
On 11/17/2011 11:15 PM, Igor Murzov wrote: The following commit has been merged in the master branch: commit 834379ef6381c83a51d9277617d49bc3d3b10c7c Author: Ville Skyttä ville.skytta at iki.fi Date: Thu Nov 17 18:00:41 2011 +0200 valgrind: New completion. That's crazy, I also wrote

Re: [Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.90-47-g068a1a1

2011-11-16 Thread Ville Skyttä
On 11/16/2011 10:21 PM, Igor Murzov wrote: The following commit has been merged in the master branch: commit b3fcb55dcf3d5a99d9a705a54dd649a976706d3f Author: Igor Murzov e-m...@date.by Date: Wed Nov 16 23:46:29 2011 +0300 __get_cword_at_cursor_by_ref: Add missing quotes.

Re: [Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.90-47-g068a1a1

2011-11-16 Thread Ville Skyttä
On 11/17/2011 02:30 AM, Igor Murzov wrote: I don't know if quotes are necessary in this particular case. But with quotes and without quotes results are different: $ x=a b c $ y=a $ z=( ${x#$y} ) $ echo ${#z[@]} 2 $ z=( ${x#$y} ) $ echo ${#z[@]} 1 Yes, for array constructs like that

Re: [Bash-completion-devel] Towards dynamic completion loading

2011-11-14 Thread Ville Skyttä
On 11/14/2011 10:21 PM, Igor Murzov wrote: On Wed, 26 Oct 2011 20:47:43 +0300 Ville Skyttä ville.sky...@iki.fi wrote: On 10/26/2011 08:10 PM, Ville Skyttä wrote: On 10/26/2011 10:24 AM, David Paleino wrote: Broken dynamic loading with meta-commands? Yes, definitely, thanks for pointing

Re: [Bash-completion-devel] Towards dynamic completion loading

2011-11-14 Thread Ville Skyttä
On 11/14/2011 09:54 PM, Ville Skyttä wrote: On 11/14/2011 10:21 PM, Igor Murzov wrote: On Wed, 26 Oct 2011 20:47:43 +0300 Ville Skyttä ville.sky...@iki.fi wrote: On 10/26/2011 08:10 PM, Ville Skyttä wrote: On 10/26/2011 10:24 AM, David Paleino wrote: Broken dynamic loading with meta

Re: [Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.3-512-g9717124

2011-11-08 Thread Ville Skyttä
On 11/08/2011 04:54 AM, Igor Murzov wrote: On Mon, 07 Nov 2011 18:41:16 +0200 Ville Skyttä ville.sky...@iki.fi wrote: I pushed new variant of the fix to the service branch. Can you look into it? I didn't look into the code that closely, but it works as expected in all test cases I threw

Re: [Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.3-512-g9717124

2011-11-07 Thread Ville Skyttä
be careful not to lose them when merging it. On Sun, 06 Nov 2011 17:44:38 +0200 Ville Skyttä ville.sky...@iki.fi wrote: I've eyeballed the xinetd.d part earlier too and I have a feeling that it shouldn't be used in this context anyway and that part should probably be just removed. xinetd

Re: [Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.3-512-g9717124

2011-11-07 Thread Ville Skyttä
On 11/07/2011 07:59 PM, Guillaume Rousse wrote: I've eyeballed the xinetd.d part earlier too and I have a feeling that it shouldn't be used in this context anyway and that part should probably be just removed. xinetd services are not to my knowledge managed by the same tools or used the same

Re: [Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.3-512-g9717124

2011-11-06 Thread Ville Skyttä
On 11/06/2011 04:37 AM, Igor Murzov wrote: It looks like we have a collision. Then it's easier for me to patch bash-completion before packaging to set proper directories for Slackware. Don't give up yet, I think this is solvable :) I just reverted your previous commit and pushed another

Re: [Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.3-512-g9717124

2011-11-06 Thread Ville Skyttä
On 11/06/2011 06:12 PM, Igor Murzov wrote: This would not work in Slackware as it does have /etc/rc.d/init.d directory and it's there to provide some compatibility with Red Hat solely for commercial (or other) software that expects to find Red Hat-isms :) Oh, damn. But let me say, I can't

Re: [Bash-completion-devel] What commands make mv *TAB and cd $HOME/dTAB not completable?

2011-11-06 Thread Ville Skyttä
On 11/06/2011 11:23 PM, Peng Yu wrote: I'm not able to complete 'mv *TAB', if there are files in the current directory. https://alioth.debian.org/tracker/index.php?func=detailaid=311982group_id=100114atid=413095 I'm also not able to complete cd $HOME/dTAB, if there is a directory data in

Re: [Bash-completion-devel] bash-completion document in pdf

2011-11-06 Thread Ville Skyttä
On 11/06/2011 11:48 PM, Peng Yu wrote: I'm wondering where is the document for bash_completion. I see README in the source package. I guess this is not the full document. For now, see doc/* in git. I'll look into including that subdir in future release tarballs. Also, if possible, I'd like

Re: [Bash-completion-devel] tmux completion

2011-11-06 Thread Ville Skyttä
On 08/20/2011 08:24 PM, Fahd Shariff wrote: Hello Bash Completion Team, I would like to request the addition of tmux completion to the bash-completion project. I have attached my completion script, which I have been using for a while. It would be nice if someone could review it. Could

[Bash-completion-devel] Always using [[ instead of [

2011-11-05 Thread Ville Skyttä
On 11/05/2011 06:48 PM, Igor Murzov wrote: -[ -r $i ] config+=( $i ) +[ -r $i ] config+=( $i ) Related to the above, I've had the intention to suggest that we apply a policy of always using [[ instead of [. It doesn't suffer from whitespace problems like the above, is

Re: [Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.3-512-g9717124

2011-11-05 Thread Ville Skyttä
On 11/05/2011 11:50 PM, Igor Murzov wrote: How about this (diff is against prior version as this is more demonstrative)? Something along those lines looks better, thanks for looking into it. But if I read it correctly, it'll now unconditionally install service completions for everything in

Re: [Bash-completion-devel] bash-completion between do and done

2011-11-04 Thread Ville Skyttä
On 11/04/2011 06:56 AM, Peng Yu wrote: Current, bash doesn't do command completion between do and done (for loop). I'm wondering if this feature can be added? I'm fairly certain that there's nothing we can do about that, so I suggest asking the bash developers: http://www.gnu.org/s/bash/#mail

[Bash-completion-devel] Bug#647352: Bug#647352: ssh completion only completes first two hosts per line of known_hosts

2011-11-04 Thread Ville Skyttä
Fixed in upstream git: http://anonscm.debian.org/gitweb/?p=bash-completion/bash-completion.git;a=commitdiff;h=333a5a5 ___ Bash-completion-devel mailing list Bash-completion-devel@lists.alioth.debian.org

Re: [Bash-completion-devel] bash-completion 1.99 in Debian experimental

2011-11-01 Thread Ville Skyttä
On 11/01/2011 08:51 PM, David Paleino wrote: If there are no objections, I'll go ahed uploading bash-completion 1.3-488-gce128e7 (that's what git-describe gave me: that means 488 commits after 1.3, git commit ce128e7). Not at all, I've been planning to do the same for Fedora Rawhide.

Re: [Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.3-489-gc0ea434

2011-11-01 Thread Ville Skyttä
On 11/01/2011 09:23 PM, David Paleino wrote: The following commit has been merged in the master branch: commit c0ea434660e9ab99c5bdae5a6d577dcfa16a64de Author: David Paleino da...@debian.org Date: Tue Nov 1 20:23:53 2011 +0100 Also complete on dpkg-query (Debian: #642526) [...]

Re: [Bash-completion-devel] bash-completion 1.99 in Debian experimental

2011-11-01 Thread Ville Skyttä
On 11/01/2011 09:37 PM, David Paleino wrote: I would prefer using the git describe I proposed earlier, but I have no strong objections about using 1.90 :) NP, go ahead with what you prefer, I'll probably follow suit ;) ___ Bash-completion-devel

Re: [Bash-completion-devel] Towards dynamic completion loading

2011-10-26 Thread Ville Skyttä
On 10/26/2011 10:40 AM, David Paleino wrote: One more thing: even with the apt-get completion loaded (see my previous post), I get: $ sudo apt-get --purge remove TABbash: _comp_dpkg_installed_packages: command not found I see that _comp_dpkg_installed_packages exists in

Re: [Bash-completion-devel] Towards dynamic completion loading

2011-10-26 Thread Ville Skyttä
On 10/26/2011 10:24 AM, David Paleino wrote: Broken dynamic loading with meta-commands? Yes, definitely, thanks for pointing it out - I haven't considered this case at all but I'm looking into it right now. ___ Bash-completion-devel mailing list

Re: [Bash-completion-devel] Towards dynamic completion loading

2011-10-26 Thread Ville Skyttä
On 10/22/2011 12:57 PM, Ville Skyttä wrote: Testsuite still needs to be fixed, Done in commit 6e08dc5. ___ Bash-completion-devel mailing list Bash-completion-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash

Re: [Bash-completion-devel] Towards dynamic completion loading

2011-10-24 Thread Ville Skyttä
On 10/24/2011 01:29 AM, Igor Murzov wrote: But then again, completing variable names doesn't really work in the master branch either for commands we install completions for. At least `echo $BTAB` works as expected in the master branch. Yes, but please note that I said for commands we

Re: [Bash-completion-devel] Towards dynamic completion loading

2011-10-24 Thread Ville Skyttä
On 10/24/2011 01:21 AM, Igor Murzov wrote: Also how you want to distinguish among different programs with the same name? Is the path to a binary really makes any sense for this? For some case such as init.d scripts it does, for many others it doesn't. Anyway, as said earlier, we don't really

Re: [Bash-completion-devel] Towards dynamic completion loading

2011-10-23 Thread Ville Skyttä
On 10/23/2011 01:19 AM, Igor Murzov wrote: On Thu, 20 Oct 2011 20:47:45 +0300 Ville Skyttä ville.sky...@iki.fi wrote: No comments yet? If there are none or there are no strong objections soon, I'm going to merge this to master soon I have tested dynamic loading now. That's what I don't

Re: [Bash-completion-devel] [PATCH 2/2] Merge completions/service into the bash_completion script.

2011-10-23 Thread Ville Skyttä
On 10/23/2011 02:48 AM, Igor Murzov wrote: Also make this completions work on Slackware GNU/Linux. --- bash_completion | 48 ++-- completions/service | 40 2 files changed, 42 insertions(+), 46

Re: [Bash-completion-devel] [PATCH 1/2] Don't use full path in the _completion_loader() function.

2011-10-23 Thread Ville Skyttä
On 10/23/2011 02:48 AM, Igor Murzov wrote: --- bash_completion |7 +-- 1 files changed, 1 insertions(+), 6 deletions(-) See my comments about this in the Towards dynamic completion loading thread. ___ Bash-completion-devel mailing list

Re: [Bash-completion-devel] Towards dynamic completion loading

2011-10-23 Thread Ville Skyttä
On 10/23/2011 03:08 AM, Igor Murzov wrote: Found a regression. Completing shell variables names no longer works. $ echo $BTAB gives me $ echo \$BASH for dynamic-loading branch. Further hits of tab button give no effect. I don't know if there's much/anything we can do about this.

Re: [Bash-completion-devel] Towards dynamic completion loading

2011-10-23 Thread Ville Skyttä
On 10/23/2011 02:08 AM, Igor Murzov wrote: Is backward compatibility necessary? I suppose that if we raise major version number, then we can drop this compatibility and remove all deprecated functions :) This will make bash_completion slimmer. I think this is not something that we should do

Re: [Bash-completion-devel] Towards dynamic completion loading

2011-10-23 Thread Ville Skyttä
On 10/23/2011 10:41 AM, Ville Skyttä wrote: On 10/23/2011 03:08 AM, Igor Murzov wrote: Found a regression. Completing shell variables names no longer works. $ echo $BTAB gives me $ echo \$BASH for dynamic-loading branch. Further hits of tab button give no effect. I don't know if there's

Re: [Bash-completion-devel] lpr/lprm bash completion scripts

2011-10-22 Thread Ville Skyttä
On 10/21/2011 05:00 PM, Raphaël Droz wrote: [ searchable mailing-list archives would be nice to avoid duplicated work ] http://dir.gmane.org/gmane.comp.shells.bash.completion.devel ___ Bash-completion-devel mailing list

Re: [Bash-completion-devel] Towards dynamic completion loading

2011-10-22 Thread Ville Skyttä
On 10/20/2011 09:04 PM, David Paleino wrote: On Thu, 20 Oct 2011 20:47:45 +0300, Ville Skyttä wrote: No comments yet? If there are none or there are no strong objections soon, I'm going to merge this to master soon because the way it reorganizes some things makes it hard to merge changes

Re: [Bash-completion-devel] Towards dynamic completion loading

2011-10-18 Thread Ville Skyttä
On 10/18/2011 11:40 PM, Ville Skyttä wrote: On 09/25/2011 10:07 PM, Ville Skyttä wrote: Hello, Even though we don't have a roadmap item for dynamic completion loading (bash 4+'s complete -D), I'd like to start implementing it. Okay, first cut of this is now done; I've just pushed a new

Re: [Bash-completion-devel] lrzip: conflict - bash completion also in package bash-completion

2011-09-21 Thread Ville Skyttä
On 09/20/2011 01:39 AM, Con Kolivas wrote: I'd much rather it stayed part of the bash completion package, but could you possibly use this new one instead The one in lrzip seems to have some drawbacks over the one in bash-completion and generally doesn't match bash-completion's style, so I did

[Bash-completion-devel] Making _filedir's fallback to everything optional

2011-09-04 Thread Ville Skyttä
Hello, Regarding this change: http://anonscm.debian.org/gitweb/?p=bash-completion/bash-completion.git;a=commitdiff;h=14fc9f2 I have been trying to get accustomed to this behavior for almost half a year now, but after far too many WTF moments I can now say that I definitely dislike it - it just

Re: [Bash-completion-devel] [PATCH 0/3] ipsec: Add support for strongSwan

2011-08-20 Thread Ville Skyttä
On 08/04/2011 06:48 PM, Tobias Brunner wrote: Hi, this patch series adds basic support for strongSwan to the completion for the ipsec command. If strongSwan is not installed (i.e. the ipsec command is not provided by strongSwan) the completion falls back to what was previously implemented

Re: [Bash-completion-devel] completion for setxkbmap(1)

2011-08-19 Thread Ville Skyttä
On 08/18/2011 09:39 PM, Raphaël Droz wrote: attached, needs review *Very* unthrorough one below: sed -n '/! '$1'/{n; :a; /^!/q; p; n;b a;}' ${2:-$files}|awk '{print $1}' How portable is this sed statement? I don't know sed well enough to be able to even read it ;). Maybe it could be

[Bash-completion-devel] Bug#638227: Bug#638227: bash-completion: fails to escape or quote filenames with shell metacharacters in their names

2011-08-19 Thread Ville Skyttä
On 08/17/2011 11:24 PM, Brian Minton wrote: I have a file with shell metacharacters such as and ? in the name. Formerly, bash-completion would escape or quote the file name, but now the entire file name with no escaping or quoting is placed on the command line. This causes the command line

Re: [Bash-completion-devel] Why bash-completion does not use complete -D??

2011-08-15 Thread Ville Skyttä
On 08/14/2011 11:37 PM, Oleksandr Gavenko wrote: What plans to incorporate -D to 'bash_completion'? There is no explicit plan agreed/discussed yet project wide, but I am interested in it and have thought about it somewhat. A proper implementation is not rocket science but it takes somewhat

[Bash-completion-devel] Bug#593835: Bug#593835: Bug#593835: bash-completion: non optional by being in /etc/profile.d

2011-07-07 Thread Ville Skyttä
The profile.d script in bash-completion 1.3 checks whether programmable completion is enabled and does not load bash_completion if it's not. Additionally, in git there's now a config file hook in it that makes it easier to disable bash_completion on per user basis:

[Bash-completion-devel] Bug#632026: Bug#632026: bash-completion: aborts if set -u for unknown/undef vars

2011-06-29 Thread Ville Skyttä
On 06/29/2011 10:42 AM, Teodor wrote: Please add support for set -u. This is already on the upstream roadmap for version 3.0, but there is no target date set for it yet. http://wiki.debian.org/Teams/BashCompletion/Proposals/Roadmap ___

Re: [Bash-completion-devel] cups

2011-06-19 Thread Ville Skyttä
On 06/19/2011 03:29 AM, Raphaël wrote: I wanted to use send-email this time but I realized I don't know git. I strongly believed that the following would format 1 patch only: $ git format-patch --stdout ee875cb29a26133f9dae0625b2369b8072ff9095 -- completions/cups but it didn't (it is

Re: [Bash-completion-devel] notations which need to be documented

2011-06-18 Thread Ville Skyttä
On 06/13/2011 03:50 PM, Raphaël wrote: * why define split in: local cur prev words cword split eg: if we use the -s (or -n =) switch in init_completion ... This is already documented in the _init_completion doc block. By the way, it's needed only with -s, not -n. * why: $split

Re: [Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.3-365-g2a05603

2011-06-18 Thread Ville Skyttä
On 06/14/2011 10:31 PM, David Paleino wrote: +# Blacklisted completions, causing problems with our code. +# +_blacklist_glob='@(acroread.sh)' I considered this approach earlier for the Fedora bash-completion package, but did not choose to do it for these reasons: * It disables loading of the

Re: [Bash-completion-devel] mysql, sitecopy, cups

2011-06-18 Thread Ville Skyttä
On 06/13/2011 03:45 PM, Raphaël wrote: Almost all issues have been addressed in the attached patches. All applied, with some followup fixes/tweaks. (but, if possible, I would like to stay away from the test suite for now) Not submitting test cases means more work for folks reviewing the

Re: [Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.3-357-gc7e2640

2011-06-12 Thread Ville Skyttä
On 06/11/2011 11:05 PM, David Paleino wrote: The following commit has been merged in the master branch: commit c7e26402ca4509ac38a616e430b3d1538b9f1c60 Author: Raphaël Droz raphael.droz+fl...@gmail.com Date: Sat Jun 11 22:04:19 2011 +0200 Added completion scripts for lpr(1) and

Re: [Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.3-358-g7bcf9a4

2011-06-12 Thread Ville Skyttä
On 06/11/2011 11:06 PM, David Paleino wrote: -COMPREPLY=( $( compgen -W $(command grep '^[$'\t ']*site' \ -~/.sitecopyrc | awk '{print $2}') -- $cur ) ) +COMPREPLY=( $( compgen -W $(sitecopy -v | \ + command sed -n

[Bash-completion-devel] Bug#615134: Bug#615134: mutt: does not complete any aliases anymore

2011-06-11 Thread Ville Skyttä
On 06/11/2011 11:07 AM, Helmut Grohne wrote: In any case you do have a reproducible test case now, so you should be able to test your proposed solutions by yourself instead of throwing random untested hunks at me. No worries, I'll stop trying to help with this issue right now. I'm not a mutt

Re: [Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.3-349-ga0834d3

2011-06-08 Thread Ville Skyttä
On 06/08/2011 02:58 AM, Igor Murzov wrote: if [[ $cur == -* ]]; then COMPREPLY=( $( compgen -W '--warn --root' -- $cur) ) - return + [[ ${#COMPREPLY[@]} -gt 0 ]] return fi _filedir t[bglx]z } complete -F _installpkg installpkg This way this function

[Bash-completion-devel] Bug#629108: Bug#629108: bash-completion: python COMP_WORDS bad array subscript

2011-06-03 Thread Ville Skyttä
On 06/03/2011 06:34 PM, xiscu wrote: Hello all, I'm getting the error: bash: COMP_WORDS: bad array subscript for python completion. To reproduce: - In a new terminal type: ./python [TAB] I believe this the same issue you reported in #559953, and that it is fixed in bash-completion 1.3.

[Bash-completion-devel] Bug#628123: Bug#628123: bash-completion: Add cd for longopt completion

2011-05-30 Thread Ville Skyttä
On 05/27/2011 03:46 PM, Luca Bruno wrote: I'd like to ask for adding cd to the list of commands such that _longopt is used: complete -F _longopt -o default cd Simply doing that would break the $CDPATH completion we currently have for cd. And _longopt isn't really the right thing to do as

[Bash-completion-devel] Bug#628071: Bug#628071: bash-completion: Add webm to /etc/bash_completion.d/mplayer

2011-05-27 Thread Ville Skyttä
On 05/27/2011 12:26 AM, George Standish wrote: Adding webm to /etc/bash_completion.d/mplayer resolves issue. Already done in bash-completion 1.3, see bug 588079. ___ Bash-completion-devel mailing list Bash-completion-devel@lists.alioth.debian.org

Re: [Bash-completion-devel] Get stuck

2011-05-25 Thread Ville Skyttä
On 05/25/2011 11:52 AM, Igor Murzov wrote: upgradepkg old_package_name%new_package_name I want to handle this notation in completion. I need to complete filenames and directories after '%'. I wrote two variants of completion function, but none of them works as expected. Actually, prefix

Re: [Bash-completion-devel] Get stuck

2011-05-23 Thread Ville Skyttä
On 05/23/2011 02:45 AM, Igor Murzov wrote: Hey! I get stuck trying to implement completion script for strings containing two parts for completion delimited by '%' sign. For example, `cmd opt%arg`. The problem is that, if i hit tab key, when cursor is behind delimeter, bash eats first part

[Bash-completion-devel] git.debian.org git:// down, SSH key changed?

2011-05-23 Thread Ville Skyttä
I haven't been able to access git.debian.org with git:// for a few days: $ git pull git.debian.org[0: 217.196.43.140]: errno=Connection refused fatal: unable to connect a socket (Connection refused) This is with a git:// URL in .git/config (I tend to use plain git:// for read access as it tends

Re: [Bash-completion-devel] Get stuck

2011-05-23 Thread Ville Skyttä
On 05/23/2011 11:57 PM, Raph wrote: and I'm interested too in knowing how to deals with COMP_WORDBREAK, (especially using properly the API) I think the API facilities we have for this are the -n arguments to _get_comp_words_by_ref and _init_completion. I don't claim to understand anywhere

Re: [Bash-completion-devel] Namespace

2011-05-09 Thread Ville Skyttä
On 05/09/2011 01:03 AM, Freddy Vulto wrote: +1 for BASHCOMP_* for the setting variables (maybe we can also support a '.bashcomprc' file to allow a user to get rid of the globals)? We already support ~/.bash_completion, wouldn't it work for that purpose? But I'm not entirely sure what you mean

Re: [Bash-completion-devel] some patches from a git repo

2011-05-04 Thread Ville Skyttä
On 05/04/2011 12:42 PM, Raph wrote: My sed does on the other hand document -r/--regexp-extended for that purpose but that isn't portable either. POSIX sed has only -n, -e, and -f; no extended regexps there. You're right, -E works like -r in my version but I was probably confused with grep

Re: [Bash-completion-devel] some patches from a git repo

2011-05-03 Thread Ville Skyttä
On 05/03/2011 09:42 PM, Raph wrote: On Tue, May 03, 2011 at 09:22:00PM +0300, Ville Skyttä wrote: -D|--database: What's the -E argument to sed? Extended regexp (to avoid too much backslashes) but I not sure whether or not it's cross-platform. It isn't. For example my sed (GNU sed 4.2.1) does

Re: [Bash-completion-devel] [PATCH] Bug#559953: COMP_WORDS: bad array subscript

2011-05-02 Thread Ville Skyttä
On 05/01/2011 09:12 PM, Igor Murzov wrote: For example, write ls and then go to the start of line, what do you think $cur and $prev should be set to when completing at that point? I think both of them should be empty, but then again I also think that in that case the ls completion should not

Re: [Bash-completion-devel] Layout change

2011-05-02 Thread Ville Skyttä
On 05/02/2011 06:07 PM, David Paleino wrote: $ tree -L 1 /usr/share/bash-completion/ /usr/share/bash-completion/ |-- bash_completion |-- completions `-- helpers That looks fine to me, but I'd like to get rid of the BASH_COMPLETION_DIR and BASH_COMPLETION_HELPERS_DIR variables altogether. I

[Bash-completion-devel] Weirdness when invoking php in a completion function

2011-05-02 Thread Ville Skyttä
Hello, I ran into something weird when php gets invoked inside a completion function. For example: $ bash --norc $ _php() { COMPREPLY=( $( compgen -W '$( php -h )' -- $2 ) ); } $ complete -F _php php Then, tried completing php -TAB. All good so far, stuff starting with - is listed. But then

Re: [Bash-completion-devel] [PATCH] Bug#559953: COMP_WORDS: bad array subscript

2011-05-01 Thread Ville Skyttä
On 05/01/2011 05:40 PM, Ville Skyttä wrote: For example, write ls and then go to the start of line, what do you think $cur and $prev should be set to when completing at that point? I think both of them should be empty, but then again I also think that in that case the ls completion should

Re: [Bash-completion-devel] improvements for tar, cryptsetup, imagemagick completions and the _parse_help function

2011-05-01 Thread Ville Skyttä
On 05/01/2011 12:15 AM, Frank Harwald wrote: I have made some improvements on the bash-completions for tar, cryptsetup, imagemagick and the _parse_help function. [...] everything is in the gzipped tar ball attached to this mail. The _parse_help function is in a diff -u. Thanks for your

Re: [Bash-completion-devel] Policy for CHANGES

2011-04-28 Thread Ville Skyttä
On 04/27/2011 09:56 PM, David Paleino wrote: [ Upstream Name Surname ] * Fix blbla, patch by ThirdParty Contributor (Alioth: #...) instead of making sections for each contributor (s/patch by/thanks to/ if you prefer) Opinions? No strong opinions, but if this is the direction we want to

Re: [Bash-completion-devel] Policy for CHANGES

2011-04-28 Thread Ville Skyttä
On 04/28/2011 05:46 PM, David Paleino wrote: Let's generate CHANGES from git log pre-release (maybe with manual checks to avoid small commits), and write a separate human-friendly NEWS? Sounds good to me. ___ Bash-completion-devel mailing list

Re: [Bash-completion-devel] [PATCH] Add completion scripts for fcoe-utils and open-lldp

2011-04-25 Thread Ville Skyttä
Hello Robert, On 04/21/2011 12:19 AM, Robert Love wrote: This patch adds completion scripts for fcoeadm, fcoemon, lldpad and lldptool. They are very simple scripts, but do the trick. A shortcoming of the lldptool completion script is that it does not differentiate between options and

[Bash-completion-devel] Presenting long options that require args as --foo=

2011-04-25 Thread Ville Skyttä
Hello, Now that long option splitting works again and we have no bash 4 baggage that makes it difficult to get things right wrt. this, I suggest we start outputting long options that take arguments in tools that can take them separated with the equals sign with the equals sign included. That'd

Re: [Bash-completion-devel] Dynamic completion loader.

2011-04-14 Thread Ville Skyttä
Ok, drop bash 4.1 support added to roadmap for 2.0 in Wiki. ___ Bash-completion-devel mailing list Bash-completion-devel@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/bash-completion-devel

Re: [Bash-completion-devel] Dynamic completion loader.

2011-04-09 Thread Ville Skyttä
On 04/08/2011 11:02 AM, David Paleino wrote: However, being upstream, I can't just say in Debian we have it, let's drop support altogether!. We somehow need to check how many users use 3.2 x 4.1. We also need to be realistic - if there are no active contributors/maintainers actively

Re: [Bash-completion-devel] correcting java completion

2011-04-06 Thread Ville Skyttä
On 04/06/2011 03:24 PM, Mattias Ulbrich wrote: The attached patch should amend this. Applied along with a test case and CHANGES entry, thanks. ___ Bash-completion-devel mailing list Bash-completion-devel@lists.alioth.debian.org

Re: [Bash-completion-devel] After adding bash-completion to .bashrc loading prompt is slow

2011-04-05 Thread Ville Skyttä
On 04/05/2011 09:36 AM, David Paleino wrote: real 0m10.734s user 0m0.752s sys 0m0.224s Ouch :(. But on the other hand, with numbers like that, real improvements should be easily noticeable/measurable. The latest fixes by Ville, while theoretically, didn't give me a speed-up (at all,

Re: [Bash-completion-devel] After adding bash-completion to .bashrc loading prompt is slow

2011-04-05 Thread Ville Skyttä
On 04/05/2011 07:47 PM, Ville Skyttä wrote: What I'm going to experiment with next is getting a list of all commands available on the system at start of bash_completion, and making have() look up from that list instead of doing the type for them. Nah, that (see attachment) made things slower

Re: [Bash-completion-devel] After adding bash-completion to .bashrc loading prompt is slow

2011-04-03 Thread Ville Skyttä
On 04/02/2011 05:49 PM, David Paleino wrote: I guess it also depends whether you have it already loaded or not. On my system, at first load: real 0m5.677s user 0m0.736s sys 0m0.192s Wow, I don't think I've ever seen anything close to this. What did you do in order to get these

[Bash-completion-devel] RFC: generic redirection handling

2011-03-29 Thread Ville Skyttä
Hello, I've been working on generic redirection handling for bash completion, and have now something I think would be ready for committing. The basic idea is that whenever there are redirections in the command line (/dev/null, foo, etc), we'd have a hook that would invoke _filedir for them as

[Bash-completion-devel] Bug#618734: [RFC/PATCH] 'tar jcf TAB' should complete arbitrary filenames

2011-03-27 Thread Ville Skyttä
On 03/27/2011 09:04 AM, Jonathan Nieder wrote: What do you think of Adam's suggestion that tar cf, unlike tar rf, shouldn't look for existing .tar files at all? My personal opinion is that looking for existing tar files with c is a good thing. I use that behavior regularly to overwrite

<    1   2   3   4   >