help-bash
[Top][All Lists]
Advanced

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

Adding option to select file types


From: lisa-asket
Subject: Adding option to select file types
Date: Tue, 6 Jul 2021 01:47:31 +0200 (CEST)

Why does printf complain with the following help displays?



        frmt="%s"
        printf $frmt "Print text surrounding line numbers from named files.\n"
        printf $frmt "-d DIR\n--directory=DIR\n"
        printf $frmt "    Directory.\n"
        printf $frmt "-e TYPE\n--extension=TYPE\n"
        printf $frmt "    Extension defining file type.  Multiple file are\n"
        printf $frmt "    separated by a comma (e.g. `-e org,texi`).\n"
        printf $frmt "-p NUM\n--startline=NUM.\n"
        printf $frmt "    Start line number.\n"
        printf $frmt "-q NUM\n--stopline=NUM.\n"
        printf $frmt "    Stop line number.\n"


From: Leonid Isaev (ifax) <leonid.isaev@ifax.com>
To: help-bash@gnu.org
Subject: Re: Adding option to select file types
Date: 05/07/2021 17:30:45 Europe/Paris

On Mon, Jul 05, 2021 at 08:50:09AM -0400, Greg Wooledge wrote:
> local dir=$3
> ...
> local findargs=( "$dir" '(' )

One probably should check if "$dir" starts with a "-" (and prepend ./ if so)?

Sincerely,
L.

-- 
Leonid Isaev




reply via email to

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