texinfo-commits
[Top][All Lists]
Advanced

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

[5862] single match for info --all


From: Gavin D. Smith
Subject: [5862] single match for info --all
Date: Mon, 06 Oct 2014 13:44:58 +0000

Revision: 5862
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5862
Author:   gavin
Date:     2014-10-06 13:44:57 +0000 (Mon, 06 Oct 2014)
Log Message:
-----------
single match for info --all

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/Makefile.am
    trunk/info/info.c

Added Paths:
-----------
    trunk/info/t/all-only.sh

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-10-06 13:28:03 UTC (rev 5861)
+++ trunk/ChangeLog     2014-10-06 13:44:57 UTC (rev 5862)
@@ -5,6 +5,10 @@
        * info/infomap.c (fetch_user_maps): Don't print an error message 
        if ".infokey" wasn't found.  Report from Karl Berry.
 
+       * info/info.c (main) <--all>: If only one match, don't display a 
+       menu of matches (this is what happened before).
+       * info/t/all-only.sh: New test.
+
 2014-10-06  Ken Brown  <address@hidden> (tiny change)
 
        * system.h [O_BINARY && !__MSDOS__]: Don't redefine setmode if 

Modified: trunk/info/Makefile.am
===================================================================
--- trunk/info/Makefile.am      2014-10-06 13:28:03 UTC (rev 5861)
+++ trunk/info/Makefile.am      2014-10-06 13:44:57 UTC (rev 5862)
@@ -105,6 +105,7 @@
        t/dir-3-menus.sh \
        t/dir-menus-sloppily.sh \
        t/where-dir-file.sh \
+       t/all-only.sh \
        t/tab.sh \
        t/tab-argument.sh \
        t/body-start.sh \

Modified: trunk/info/info.c
===================================================================
--- trunk/info/info.c   2014-10-06 13:28:03 UTC (rev 5861)
+++ trunk/info/info.c   2014-10-06 13:44:57 UTC (rev 5862)
@@ -824,6 +824,9 @@
           exit (1);
         }
       info_find_matching_files (user_filename);
+      /* If only one match, don't start in a menu of matches. */
+      if (ref_index == 1)
+        all_matches_p = 0;
     }
   else
     {

Added: trunk/info/t/all-only.sh
===================================================================
--- trunk/info/t/all-only.sh                            (rev 0)
+++ trunk/info/t/all-only.sh    2014-10-06 13:44:57 UTC (rev 5862)
@@ -0,0 +1,35 @@
+#!/bin/sh
+# Copyright (C) 2014 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+srcdir=${srcdir:-.}
+. $srcdir/t/Init-test.inc
+. $t/Init-inter.inc
+
+# Try to stop a "man" command finding a man page called "intera"
+export MANPATH=.
+
+# Check that if there is only one file found with --all, we go straight
+# to that file without loading a menu of matching files.  This relies
+# on there being no "intera" entry in "dir".
+run_ginfo --all intera
+printf 'Dq' >$PTY_TYPE
+. $t/Timeout-test.inc
+
+grep '^File: intera.info,  Node: Top' $GINFO_OUTPUT
+RETVAL=$?
+
+. $t/Cleanup.inc
+


Property changes on: trunk/info/t/all-only.sh
___________________________________________________________________
Added: svn:executable
   + *




reply via email to

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