[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash completion strings
From: |
Karl Hammar |
Subject: |
Re: Bash completion strings |
Date: |
Mon, 23 Apr 2007 13:35:50 +0200 (CEST) |
address@hidden:
...
> In order to handle the .ly-extension correctly, on needs to install bash
> completion string in file /etc/bash_completion.d/lilypond :
>
> # LilyPond completion.
> complete -f -X '!*.@(ly|LY)' lilypond
Nice tip, but you have to have the shell option extglob to be able to
use the @(...) construct:
$ complete -f -X '!*.@(ly|LY)' lilypond
$ lilypond <TAB><TAB>
<no reaction>
$ shopt -s extglob
$ complete -f -X '!*.@(ly|LY)' lilypond
$ lilypond <TAB><TAB>
Mliv.ly Sliv.ly ...
$ lilypond
Why not just ignore uppercase LY and add lytex
complete -f -X '!*.ly' lilypond
complete -f -X '!*.lytex' lilypond-book
Regards,
/Karl
-----------------------------------------------------------------------
Karl Hammar Aspö Data address@hidden
Lilla Aspö 2340 Networks
S-742 94 Östhammar +46 173 140 57 Computers
Sweden +46 70 511 97 84 Consulting
-----------------------------------------------------------------------