monotone-commits-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-commits-diffs] net.venge.monotone: fc7f14c4e20b451cea25a05628


From: code
Subject: [Monotone-commits-diffs] net.venge.monotone: fc7f14c4e20b451cea25a056288efd4e1f9a11b7
Date: Thu, 24 Feb 2011 10:21:34 +0100 (CET)

revision:            fc7f14c4e20b451cea25a056288efd4e1f9a11b7
date:                2011-02-24T09:21:09
author:              Richard Levitte <address@hidden>
branch:              net.venge.monotone
changelog:
* extra/shell/monotone.bash_completion.in (_monotone_databases): New
  completion functions that will output files and managed databases.
* extra/shell/monotone_gen_bash_completion_table.pl: Use that function to
  complete databases for the --db/-d option.  Also, change all _filedir
  to _monotone_files.  It currently makes no practical difference, but
  might in the future.

manifest:
format_version "1"

new_manifest [21dc9a2cf238e10b9a3a5066933e71e1d2331a45]

old_revision [b3a8f899fd7e7f7083da1d36a5e3b8e0bb7972ea]

patch "extra/shell/monotone.bash_completion.in"
 from [a878e6fa815f84f18961fb2366d0235376be8c29]
   to [073ee99c02184196639fb088fe427df20264e64d]

patch "extra/shell/monotone_gen_bash_completion_table.pl"
 from [d9622d595d6e8dc1d66a5b91af5e4c967e364a9a]
   to [724f810ba4f531c872f33f966d1ff04c5adb03c7]
============================================================
--- extra/shell/monotone.bash_completion.in	a878e6fa815f84f18961fb2366d0235376be8c29
+++ extra/shell/monotone.bash_completion.in	073ee99c02184196639fb088fe427df20264e64d
@@ -68,6 +68,17 @@ _monotone_files() {
     _filedir
 }
 
+_monotone_databases() {
+    _filedir
+    COMPREPLY=(
+	"address@hidden"
+	$(compgen -W "$(LANG=POSIX \
+                        ${mtn} list databases 2> /dev/null |\
+                        grep -v '^\s' |\
+                        sed -e 's/(in [^)]*):$//')" -- ${cur#*=} )
+    )
+}
+
 # Call monotone to complete key ids (private or public)
 _monotone_keys() {
     local range
============================================================
--- extra/shell/monotone_gen_bash_completion_table.pl	d9622d595d6e8dc1d66a5b91af5e4c967e364a9a
+++ extra/shell/monotone_gen_bash_completion_table.pl	724f810ba4f531c872f33f966d1ff04c5adb03c7
@@ -103,33 +103,33 @@ print "_monotone_options_arg_fns=(\n";
 
 print "declare -A _monotone_options_arg_fns\n";
 print "_monotone_options_arg_fns=(\n";
-print "    [--authors-file]=_filedir\n";
+print "    [--authors-file]=_monotone_files\n";
 print "    [--bind]=_monotone_address_port\n";
 print "    [--branch]=_monotone_branches [-b]=_monotone_branches\n";
-print "    [--branches-file]=_filedir\n";
+print "    [--branches-file]=_monotone_files\n";
 print "    [--confdir]=_monotone_dir\n";
-print "    [--conflicts-file]=_filedir\n";
-print "    [--db]=_filedir [-d]=_filedir\n";
-print "    [--dump]=_filedir\n";
-print "    [--export-marks]=_filedir\n";
+print "    [--conflicts-file]=_monotone_files\n";
+print "    [--db]=_monotone_databases [-d]=_monotone_databases\n";
+print "    [--dump]=_monotone_files\n";
+print "    [--export-marks]=_monotone_files\n";
 print "    [--from]=_monotone_revision\n";
-print "    [--import-marks]=_filedir\n";
+print "    [--import-marks]=_monotone_files\n";
 print "    [--keydir]=_monotone_dir\n";
 print "    [--key]=_monotone_key [-k]=_monotone_public_key\n";
 print "    [--key-to-push]=_monotone_public_key\n";
-print "    [--log]=_filedir\n";
-print "    [--message_file]=_filedir\n";
-print "    [--pid-file]=_filedir\n";
-print "    [--rcfile]=_filedir\n";
+print "    [--log]=_monotone_files\n";
+print "    [--message_file]=_monotone_files\n";
+print "    [--pid-file]=_monotone_files\n";
+print "    [--rcfile]=_monotone_files\n";
 print "    [--refs]=_monotone_refs\n";
 print "    [--remote-stdio-host]=_monotone_address_port\n";
-print "    [--resolve-conflicts-file]=_filedir\n";
+print "    [--resolve-conflicts-file]=_monotone_files\n";
 print "    [--revision]=_monotone_revision [-r]=_monotone_revision\n";
 print "    [--root]=_monotone_dir\n";
 print "    [--ssh-sign]=_monotone_ssh_sign\n";
 print "    [--ticker]=_monotone_ticker\n";
-print "    [--xargs]=_filedir\n";
-print "    address@hidden";
+print "    [--xargs]=_monotone_files\n";
+print "    address@hidden";
 print ")\n";
 
 print "declare -A _monotone_aliases\n";

reply via email to

[Prev in Thread] Current Thread [Next in Thread]