File: function-definition.fish

package info (click to toggle)
fish 4.2.1-3.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 35,980 kB
  • sloc: python: 6,972; javascript: 1,407; sh: 1,009; xml: 411; ansic: 230; objc: 78; makefile: 20
file content (35 lines) | stat: -rw-r--r-- 590 bytes parent folder | download
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
#RUN: %fish %s

function stuff --argument a b c
    # This is a comment
    echo stuff
    # This is another comment
end

functions stuff
#CHECK: # Defined in {{.*}}
#CHECK: function stuff --argument-names a b c
#CHECK:    # This is a comment
#CHECK:    echo stuff
#CHECK:    # This is another comment
#CHECK: end

function commenting

    # line 2

    # line 4

    echo Bye bye says line 6
end

functions commenting
#CHECK: # Defined in {{.*}}
#CHECK: function commenting
#CHECK:
#CHECK:     # line 2
#CHECK:
#CHECK:     # line 4
#CHECK:
#CHECK:     echo Bye bye says line 6
#CHECK: end