summaryrefslogtreecommitdiff
path: root/zsh/Functions/_uri
blob: 40d181162dcbc4406bb56c0f00cfa9a1e07a18e3 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
compdef uri

local uri_commands 
uri_commands=( \
    create change scheme has_recognized_scheme \
    opaque path fragment as_string as_iri canonical \
    secure authority path path_query query userinfo host \
    ihost port host_port default_port \
    media_type data \
    file dir \
    user password \
    gopher_type selector search string \
    dn attributes scope filter extensions \
    un_path \
    to headers \
    group message \
    nid nss )

_arguments \
    '1: :->cmds' \
    '*:: :->args'


case $state in
    (cmds)
        _values 'uri commands'  $uri_commands
        ;;
    (args)
        _arguments \
            '--scheme=-:' \
            '--path=-:' \
            '--opaque=-[Opaque portion of URI (between scheme: and fragment)]:' \
            '--fragment=-[Escaped URI fragment (#foo)]:' \
            '--authority=-:' \
            '--query=-[Escaped query component]:' \
            '--userinfo=-[e.g. username:password]:' \
            '--port=-:' \
            '--host_port=-[host:port]:' \
            '--media_type=-[Media type for data: URIs]:' \
            '--data=-[Data for data: URIs]:' \
            '--file=-[File for file:, ftp:, etc.]:' \
            '--gopher_type=-:' \
            '--selector=-[Gopher selector]:' \
            '--search=-[Gopher query]:' \
            '--string=-[Gopher string]:' \
            '--dn=-[LDAP DN]' \
            '--attributes=-[LDAP attributes]' \
            '--scope=-[LDAP search scope]:' \
            '--extensions=-[LDAP extensions]:' \
            '--un_path=-[Local socket path for ldapi]:' \
            '--to=-[Address for mailto:]:' \
            '--headers=-[mailto: headers]:' \
            '--group=-[Newsgroup]:' \
            '--message=-[Newsgroup message]:' \
            '--nid=-[Namespace identifier for urn:]:' \
            '--nss=-[Namespace-specific string for urn:]:'
        ;;
esac