aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/__fish_commandline_test.fish
blob: a7e5e00b74794bc8a13ff6a2b237fe2f558d1e4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

function __fish_commandline_test

    set -l is_function no
    for i in (commandline -poc)
        switch $i
            case -f --f --fu --fun --func --funct --functi --functio --function
            set is_function yes

            case --
            break


        end
    end

    switch $is_function
        case yes
        return 0
    end
    return 1

end