Hi Please read the conversation below. I would like to ask about your opinions. TL;DR: I wrote completions for obnam (a backup application), it is now part of fish shell. However the obnam author suggests that obnam.fish should be maintained rather by the obnam project itself for the reasons outlined below.
---------- Forwarded message ---------- From: SanskritFritz <sanskritfr...@gmail.com> Date: Thu, May 29, 2014 at 10:36 AM Subject: Re: fish shell tab completions for obnam To: Lars Wirzenius <l...@liw.fi> Cc: obnam-...@obnam.org On Thu, May 29, 2014 at 9:49 AM, Lars Wirzenius <l...@liw.fi> wrote: > On Thu, May 29, 2014 at 09:29:39AM +0200, SanskritFritz wrote: >> On Thu, May 29, 2014 at 12:00 AM, Lars Wirzenius <l...@liw.fi> wrote: >> > Note cc to the new obnam-dev mailing list. >> > >> > On Sun, May 04, 2014 at 12:39:57AM +0200, SanskritFritz wrote: >> >> I'm happy to announce that my fish shell tab completions script for >> >> obnam has been accepted upstream: >> >> https://github.com/fish-shell/fish-shell/blob/master/share/completions/obnam.fish >> > >> > Hi, and thanks! >> > >> > I will merge that when I can. >> >> You don't have to, the file is now part of fish shell officially. > > Ah, right. That's good, too. > >> > It looks like it's a static list of >> > options, though. Is it possible to generate that list automatically, >> > perhaps at Obnam installation time (in setup.py)? That would make it >> > possible to make it always be up to date. >> >> I guess it would be possible. But I'm not sure how we could resolve >> the conflict of two installations using the same file. Installing >> obnam would overwrite obnam.fish which is part of the fish shell >> package? Definitely a bad idea. >> Another idea would be that obnam install generates the file somewhere >> else and we manually copy it over the file owned by fish. Of course we >> would send the changes upstream. >> Or we can pull obnam.fish entirelly from the fish sources and maintain >> it ourselves. >> Any ideas? > > I don't use fish myself, so I'm happy with the current situation if > you are. :) > > However, in the interest of pursuing perfection, how would this sound: > > * Only Obnam provides the obnam.fish file. > > * The file gets generated automatically at build time, and installed > at installation time by setup.py. > > * This will be implemented as a small extension to the cliapp Python > library, making it possible to provide fish completion to all > applications that use cliapp. This would be similar to the > --generate-manpage option that cliapp already provides. (Later, this > could be extended to provide completion data for other shells, if > there's interest.) > > I think this should be reasonably painless to implement, and it would > provide a way to keep the completions always up to date. However, I > don't know if this would work well with the way fish users and > developers usually do things. I'd also appreciate help with > implementing this: I can make cliapp produce an output file in the > right format, or guide someone to do it, but what is the right format? > Where should the file be placed upon installation so that fish finds > it? > > Obviously this is not an urgent thing to do, since fish now already > has completions. :) I'm fairly active in the fish project, so I'll hop over to the fish mailing list and ask for opinions first. So far the policy has definitely been that fish provides the completions for other programs. That clearly has the drawback of lagging behind, because when a new version of, say, obnam is issued, there must be another round to put the changes on the completions into fish upstream. Other shells don't usually provide completions for foreign programs, for example systemd provides bash and zsh completions, while fish provides completions for systemd. I'll be back :D ------------------------------------------------------------------------------ Time is money. Stop wasting it! Get your web API in 5 minutes. www.restlet.com/download http://p.sf.net/sfu/restlet _______________________________________________ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users