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

function __fish_bind_test1
    set -l args
    set -l use_keys no
    for i in (commandline -poc)
        switch $i
            case -k --k --ke --key
            set use_keys yes

            case "-*"

            case "*"
            set args $args $i
        end
    end

    switch $use_keys
        case yes
        switch (count $args)
            case 1
            return 0
        end
    end
    return 1
end