Re: [Help-bash] command completion with just executable but no directory
From:
Chet Ramey
Subject:
Re: [Help-bash] command completion with just executable but no directory
Date:
Mon, 14 May 2012 16:07:49 -0400
> Hi,
>
> Suppose that I have a directory xxx and an executable yyy in '..'.
>
> compgen -c will show both xxx and yyy. If I just want to show the
> executable yyy, is there a convenient option to do so?
There is not a convenient option to exclude directories. You can use a
shell function to remove them from the output of `compgen -c'.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU address@hidden http://cnswww.cns.cwru.edu/~chet/