fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Jinser Kafkacompletions/guile: update against guile/guild 3.0.11bacdcbc65

master
4.1 KiB121 linesraw
1function __fish_guile__complete_srfis
2    printf '%s\n' 0\t'cond-expand' \
3        1\t'List library' \
4        2\t'and-let*' \
5        4\t'Homogeneous numeric vector datatypes' \
6        6\t'Basic String Ports' \
7        8\t'receive' \
8        9\t'define-record-type' \
9        10\t'Hash-Comma Reader Extension' \
10        11\t'let-values' \
11        13\t'String Library' \
12        14\t'Character-set Library' \
13        16\t'case-lambda' \
14        17\t'Generalized set!' \
15        18\t'Multithreading support' \
16        19\t'Time/Date Library' \
17        23\t'Error Reporting' \
18        26\t'specializing parameters' \
19        27\t'Sources of Random Bits' \
20        28\t'Basic Format Strings' \
21        30\t'Nested Multi-line Comments' \
22        31\t'A special form ‘rec’ for recursive evaluation' \
23        34\t'Exception handling for programs' \
24        35\t'Conditions' \
25        37\t'args-fold' \
26        38\t'External Representation for Data With Shared Structure' \
27        39\t'Parameters' \
28        41\t'Streams' \
29        42\t'Eager Comprehensions' \
30        43\t'Vector Library' \
31        45\t'Primitives for Expressing Iterative Lazy Algorithms' \
32        46\t'Basic syntax-rules Extensions' \
33        55\t'Requiring Features' \
34        60\t'Integers as Bits' \
35        61\t'A more general cond clause' \
36        62\t'S-expression comments' \
37        64\t'A Scheme API for test suites' \
38        67\t'Compare procedures' \
39        69\t'Basic hash tables' \
40        71\t'Extended let-syntax for multiple values' \
41        87\t'in case clauses' \
42        88\t'Keyword Objects' \
43        98\t'Accessing environment variables' \
44        105\t'Curly-infix expressions' \
45        111\t'Boxes' \
46        119\t'Wisp: simpler indentation-sensitive Scheme' \
47        171\t'Transducers' \
48        197\t'Pipeline Operators' \
49        207\t'String-notated bytevectors' \
50        235\t'Combinators' \
51        244\t'Multiple-value Definitions'
52end
53
54function __fish_guile__complete_function_names
55    set -l path (commandline -poc |
56        string match --regex '.*\\.scm$' |
57        sed -n 1p)
58
59    test -e "$path" && begin
60        cat $path |
61            string match --all --groups-only --regex '\(\s*define\s+\(\s*(\w+)'
62    end
63end
64
65set -l command guile
66
67complete -c $command -s h -l help -d 'Show help'
68complete -c $command -s v -l version -d 'Show version'
69complete -c $command -s s -F -r -d 'Load source code from FILE and exit'
70complete -c $command -s c -x -d 'Evaluate expression EXPR and exit'
71
72complete -c $command -s L -F -r \
73    -d 'Specify the directory to prepend to module load path'
74
75complete -c $command -s C -F -r \
76    -d 'Specify the directory to prepend to module load path for compiled files'
77
78complete -c $command -s x -x \
79    -a '.scm\tdefault' \
80    -d 'Specify the extension to prepend to extension list'
81
82complete -c $command -s l -F -r -d 'Load source code from FILE'
83
84complete -c $command -s e -x \
85    -a '(__fish_guile__complete_function_names)' \
86    -d 'Specify the entry point of a script'
87
88complete -c $command -o ds \
89    -d 'Treat the last -s option as if it occurred at this point'
90
91complete -c $command -l use-srfi \
92    -a "(__fish_stripprefix='^--use-srfi=' __fish_complete_list , __fish_guile__complete_srfis)" \
93    -d 'Specify the SRFI modules to load'
94
95for standard in 6 7
96    set -l option r$standard"rs"
97
98    complete -c $command -l $option \
99        -d "Use $(string upper -- $option) compatible mode"
100end
101
102complete -c $command -l debug -d 'Use debug mode'
103complete -c $command -l no-debug -d "Don't use debug mode"
104complete -c $command -s q -d "Don't load .guile file"
105
106complete -c $command -l listen \
107    -a '37146\tdefault' \
108    -d 'Specify the port to listen on'
109
110complete -c $command -l auto-compile -d 'Compile scripts automatically'
111
112complete -c $command -l fresh-auto-compile \
113    -d 'Compile scripts automatically forcefully'
114
115complete -c $command -l no-auto-compile -d "Don't compile scripts automatically"
116
117complete -c $command -l statprof -d 'Profile using statprof and show results in STYLE'
118
119complete -c $command -l language \
120    -a 'scheme\tdefault elisp ecmascript' \
121    -d 'Specify the language for sources'