When indenting sh script in "Shell-script" mode, I have this very strange behaviour with the funtion named 'main'
It indent on more time the line in the function AND the line after the function!
example:
---------------------------
1: main( ) {
2: echo "usage: $1"
3: exit 0
4: }
5:
6: main $*
---------------------------
(for lines 2 and 3 I have one Tab, for lines 4 to 6, I have 4 spaces)
It does not do the same with an other function name of 4 letters.
---------------------------
#!/bin/sh
toto( ) {
echo "usage: $1"
exit 0
}
toto $*
---------------------------
And if I add a parameter, the behaviour changes back to normal...
---------------------------
#!/bin/sh
main( nil ) {
echo "usage: $1"
exit 0
}
main $*
---------------------------
But could not find a specific processing of the 'main' function.
Longue Vie au Gnou!