www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - DUB Bash Completion

reply =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
So I put together something that works in the majority of cases 
even for sub command specific flags including package completion:

https://github.com/nordlow/scripts/blob/master/dub-completion.bash

Feedback appreciated!
Jul 07 2014
next sibling parent reply =?UTF-8?B?U8O2bmtlIEx1ZHdpZw==?= <sludwig rejectedsoftware.com> writes:
Am 07.07.2014 11:22, schrieb "Nordlöw":
 So I put together something that works in the majority of cases even for
 sub command specific flags including package completion:

 https://github.com/nordlow/scripts/blob/master/dub-completion.bash

 Feedback appreciated!
Very nice, I'll try this out this later. If you don't mind, we should put this into the DUB main repository and also get in touch with the package maintainers to include it in the standard distribution. BTW, corresponding GitHub issue: https://github.com/D-Programming-Language/dub/issues/154
Jul 07 2014
next sibling parent reply =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
On Monday, 7 July 2014 at 10:58:02 UTC, Sönke Ludwig wrote:
 Very nice, I'll try this out this later. If you don't mind, we 
 should put this into the DUB main repository and also get in 
 touch with the package maintainers to include it in the 
 standard distribution.
Very ok with me :)
 BTW, corresponding GitHub issue:
 https://github.com/D-Programming-Language/dub/issues/154
Thx.
Jul 07 2014
parent reply =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
On Monday, 7 July 2014 at 11:55:48 UTC, Nordlöw wrote:
 BTW, corresponding GitHub issue:
 https://github.com/D-Programming-Language/dub/issues/154
Do you fix the PR?
Jul 07 2014
parent reply =?UTF-8?B?U8O2bmtlIEx1ZHdpZw==?= <sludwig rejectedsoftware.com> writes:
Am 07.07.2014 13:57, schrieb "Nordlöw":
 On Monday, 7 July 2014 at 11:55:48 UTC, Nordlöw wrote:
 BTW, corresponding GitHub issue:
 https://github.com/D-Programming-Language/dub/issues/154
Do you fix the PR?
Shall I just commit the file (with you as the author of course), or do you want to open a pull request? I've tried it now and it worked flawlessly so far.
Jul 09 2014
parent reply =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
On Wednesday, 9 July 2014 at 16:12:01 UTC, Sönke Ludwig wrote:
 Shall I just commit the file (with you as the author of 
 course), or do you want to open a pull request?
You can commit the file. That's ok with me :)
 I've tried it now and it worked flawlessly so far.
I'm glad :) Thx
Jul 10 2014
parent =?UTF-8?B?U8O2bmtlIEx1ZHdpZw==?= <sludwig rejectedsoftware.com> writes:
Am 10.07.2014 11:06, schrieb "Nordlöw":
 On Wednesday, 9 July 2014 at 16:12:01 UTC, Sönke Ludwig wrote:
 Shall I just commit the file (with you as the author of course), or do
 you want to open a pull request?
You can commit the file. That's ok with me :)
https://github.com/D-Programming-Language/dub/commit/6d4a387c62b0be271d6acf9e16cf81511077a67f Thanks again!
Jul 13 2014
prev sibling parent Jordi Sayol via Digitalmars-d-announce writes:
El 07/07/14 12:58, Sönke Ludwig via Digitalmars-d-announce ha escrit:
 Very nice, I'll try this out this later. If you don't mind, we should put this
into the DUB main repository and also get in touch with the package maintainers
to include it in the standard distribution.
I'm agree. I'll include it on deb packages as sun as it is in dub repository. Regards, -- Jordi Sayol
Jul 08 2014
prev sibling parent reply "w0rp" <devw0rp gmail.com> writes:
On Monday, 7 July 2014 at 09:22:41 UTC, Nordlöw wrote:
 So I put together something that works in the majority of cases 
 even for sub command specific flags including package 
 completion:

 https://github.com/nordlow/scripts/blob/master/dub-completion.bash

 Feedback appreciated!
This is pretty great. Thanks for writing this! I suppose one extra step you could go would be to somehow complete --config= too, so you could tab complete --config=foo and --config=bar or something.
Jul 13 2014
parent reply =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
On Sunday, 13 July 2014 at 20:15:06 UTC, w0rp wrote:
 I suppose one extra step you could go would be to somehow 
 complete --config= too, so you could tab complete --config=foo 
 and --config=bar or something.
--config is not documented by dub -h Is it a sub command flag?
Jul 13 2014
parent reply "Mathias LANG" <perso.mathias.lang gmail.com> writes:
On Sunday, 13 July 2014 at 22:11:17 UTC, Nordlöw wrote:
 On Sunday, 13 July 2014 at 20:15:06 UTC, w0rp wrote:
 I suppose one extra step you could go would be to somehow 
 complete --config= too, so you could tab complete --config=foo 
 and --config=bar or something.
--config is not documented by dub -h Is it a sub command flag?
Yeah it's a build subcommand. But you have to use dub describe to do the completion (it depends on the project file).
Jul 13 2014
parent reply =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= <per.nordlow gmail.com> writes:
On Monday, 14 July 2014 at 00:10:38 UTC, Mathias LANG wrote:
 complete --config= too, so you could tab complete
Yeah, that would be nice. Need to add som json parsing to the bash logic. Any suggestions on how to most easily and portably do that?
Jul 14 2014
parent Matt Soucy <msoucy csh.rit.edu> writes:
On 07/14/2014 05:54 PM, "Nordlöw" wrote:
 On Monday, 14 July 2014 at 00:10:38 UTC, Mathias LANG wrote:
 complete --config= too, so you could tab complete
Yeah, that would be nice. Need to add som json parsing to the bash logic. Any suggestions on how to most easily and portably do that?
So, I implemented that for the builtin ones for the fish shell... It's manually implemented, but easy enough to extend. https://github.com/D-Programming-Language/dub/pull/375 -- Matt Soucy http://msoucy.me/
Jul 18 2014