forked from x/ContextOS
mac mod nothing
This commit is contained in:
parent
2bf4883812
commit
c686d60f55
101
etc/shy.vim
101
etc/shy.vim
@ -1,85 +1,46 @@
|
|||||||
|
syn match shComment "#.*$"
|
||||||
|
syn match shNumber "-\=\<\d\+\>#\="
|
||||||
|
syn match shComment "\"[^\"]*\""
|
||||||
|
syn match shOperator "="
|
||||||
|
syn match shOperator "\~[-_a-zA-Z0-9]\+\>"
|
||||||
|
syn match shShellVariables "\$[-_a-zA-Z0-9]\+\>"
|
||||||
|
syn match shShellVariables "@[-_a-zA-Z0-9]\+\>"
|
||||||
|
|
||||||
syn keyword shStatement break cd chdir continue eval exec exit kill newgrp pwd read readonly return shift test trap ulimit umask wait
|
syn keyword shStatement break cd chdir continue eval exec exit kill newgrp pwd read readonly return shift test trap ulimit umask wait
|
||||||
|
|
||||||
syn keyword shStatement source return function
|
syn keyword shStatement source return function
|
||||||
syn keyword shStatement if else elif end for
|
syn keyword shStatement if else elif end for
|
||||||
syn keyword shStatement let var
|
syn keyword shStatement let var
|
||||||
|
|
||||||
syn match shOperator "\~[-_a-zA-Z0-9]\+\>"
|
syn keyword shCommand cache
|
||||||
syn match shShellVariables "\$[-_a-zA-Z0-9]\+\>"
|
syn keyword shCommand config
|
||||||
syn match shShellVariables "@[-_a-zA-Z0-9]\+\>"
|
syn keyword shCommand command
|
||||||
|
syn keyword shCommand open
|
||||||
|
syn keyword shCommand cookie
|
||||||
|
syn keyword shCommand login
|
||||||
|
|
||||||
hi def link shArithRegion shShellVariables
|
|
||||||
hi def link shBeginHere shRedir
|
hi def link shComment Comment
|
||||||
hi def link shCaseBar shConditional
|
hi def link shNumber Number
|
||||||
hi def link shCaseCommandSub shCommandSub
|
hi def link shString String
|
||||||
hi def link shCaseDoubleQuote shDoubleQuote
|
hi def link shOperator Operator
|
||||||
hi def link shCaseIn shConditional
|
hi def link shShellVariables PreProc
|
||||||
hi def link shQuote shOperator
|
hi def link shStatement Statement
|
||||||
hi def link shCaseSingleQuote shSingleQuote
|
hi def link shCommand Identifier
|
||||||
hi def link shCaseStart shConditional
|
|
||||||
hi def link shCmdSubRegion shShellVariables
|
|
||||||
hi def link shColon shComment
|
|
||||||
hi def link shDerefOp shOperator
|
|
||||||
hi def link shDerefPOL shDerefOp
|
|
||||||
hi def link shDerefPPS shDerefOp
|
|
||||||
hi def link shDeref shShellVariables
|
|
||||||
hi def link shDerefDelim shOperator
|
|
||||||
hi def link shDerefSimple shDeref
|
|
||||||
hi def link shDerefSpecial shDeref
|
|
||||||
hi def link shDerefString shDoubleQuote
|
|
||||||
hi def link shDerefVar shDeref
|
|
||||||
hi def link shDoubleQuote shString
|
|
||||||
hi def link shEcho shString
|
|
||||||
hi def link shEchoDelim shOperator
|
|
||||||
hi def link shEchoQuote shString
|
|
||||||
hi def link shEmbeddedEcho shString
|
|
||||||
hi def link shEscape shCommandSub
|
|
||||||
hi def link shExDoubleQuote shDoubleQuote
|
|
||||||
hi def link shExSingleQuote shSingleQuote
|
|
||||||
hi def link shFunction Function
|
|
||||||
hi def link shHereDoc shString
|
|
||||||
hi def link shHerePayload shHereDoc
|
|
||||||
hi def link shLoop shStatement
|
|
||||||
hi def link shMoreSpecial shSpecial
|
|
||||||
hi def link shOption shCommandSub
|
|
||||||
hi def link shPattern shString
|
|
||||||
hi def link shParen shArithmetic
|
|
||||||
hi def link shPosnParm shShellVariables
|
|
||||||
hi def link shQuickComment shComment
|
|
||||||
hi def link shRange shOperator
|
|
||||||
hi def link shRedir shOperator
|
|
||||||
hi def link shSetListDelim shOperator
|
|
||||||
hi def link shSetOption shOption
|
|
||||||
hi def link shSingleQuote shString
|
|
||||||
hi def link shSource shOperator
|
|
||||||
hi def link shStringSpecial shSpecial
|
|
||||||
hi def link shSubShRegion shOperator
|
|
||||||
hi def link shTestOpr shConditional
|
|
||||||
hi def link shTestPattern shString
|
|
||||||
hi def link shTestDoubleQuote shString
|
|
||||||
hi def link shTestSingleQuote shString
|
|
||||||
hi def link shVariable shSetList
|
|
||||||
hi def link shWrapLineOperator shOperator
|
|
||||||
|
|
||||||
hi def link shArithmetic Special
|
hi def link shArithmetic Special
|
||||||
hi def link shCharClass Identifier
|
hi def link shCharClass Identifier
|
||||||
hi def link shSnglCase Statement
|
hi def link shSnglCase Statement
|
||||||
hi def link shCommandSub Special
|
hi def link shCommandSub Special
|
||||||
hi def link shComment Comment
|
|
||||||
hi def link shConditional Conditional
|
hi def link shConditional Conditional
|
||||||
hi def link shCtrlSeq Special
|
hi def link shCtrlSeq Special
|
||||||
hi def link shExprRegion Delimiter
|
hi def link shExprRegion Delimiter
|
||||||
hi def link shFunctionKey Function
|
hi def link shFunctionKey Function
|
||||||
hi def link shFunctionName Function
|
hi def link shFunctionName Function
|
||||||
hi def link shNumber Number
|
hi def link shRepeat Repeat
|
||||||
hi def link shOperator Operator
|
hi def link shSet Statement
|
||||||
hi def link shRepeat Repeat
|
hi def link shSetList Identifier
|
||||||
hi def link shSet Statement
|
hi def link shSpecial Special
|
||||||
hi def link shSetList Identifier
|
hi def link shTodo Todo
|
||||||
hi def link shShellVariables PreProc
|
hi def link shAlias Identifier
|
||||||
hi def link shSpecial Special
|
|
||||||
hi def link shStatement Statement
|
|
||||||
hi def link shString String
|
|
||||||
hi def link shTodo Todo
|
|
||||||
hi def link shAlias Identifier
|
|
||||||
|
|
||||||
|
@ -1960,9 +1960,7 @@ var Index = &Context{Name: "ctx", Help: "模块中心",
|
|||||||
m.Color(32, "ctx ").Color(33, "cli ").Color(31, "aaa ").Color(33, "web\n")
|
m.Color(32, "ctx ").Color(33, "cli ").Color(31, "aaa ").Color(33, "web\n")
|
||||||
m.Color(32, "lex ").Color(33, "yac ").Color(31, "log ").Color(33, "gdb\n")
|
m.Color(32, "lex ").Color(33, "yac ").Color(31, "log ").Color(33, "gdb\n")
|
||||||
m.Color(32, "tcp ").Color(33, "nfs ").Color(31, "ssh ").Color(33, "mdb\n")
|
m.Color(32, "tcp ").Color(33, "nfs ").Color(31, "ssh ").Color(33, "mdb\n")
|
||||||
m.Echo("\n")
|
m.Color(31, "template ").Color(32, "script\n")
|
||||||
|
|
||||||
m.Color(31, " edukid ").Color(32, "etcvpn\n")
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -614,6 +614,7 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
|
|||||||
// 权限检查
|
// 权限检查
|
||||||
m.Option("right", "")
|
m.Option("right", "")
|
||||||
m.Option("message", "")
|
m.Option("message", "")
|
||||||
|
m.Option("username", "")
|
||||||
aaa := m.Find("aaa").Cmd("login", m.Option("sessid"))
|
aaa := m.Find("aaa").Cmd("login", m.Option("sessid"))
|
||||||
if aaa.Result(0) == "error: " {
|
if aaa.Result(0) == "error: " {
|
||||||
m.Option("sessid", "")
|
m.Option("sessid", "")
|
||||||
@ -892,6 +893,24 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
|
|||||||
delete(m.Meta, "append")
|
delete(m.Meta, "append")
|
||||||
// }}}
|
// }}}
|
||||||
}},
|
}},
|
||||||
|
"/check": &ctx.Command{Name: "/check", Help: "文件上传", Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) {
|
||||||
|
m.Option("right", "")
|
||||||
|
m.Option("message", "")
|
||||||
|
m.Option("username", "")
|
||||||
|
aaa := m.Find("aaa").Cmd("login", m.Option("sessid"))
|
||||||
|
if aaa.Result(0) == "error: " {
|
||||||
|
m.Option("sessid", "")
|
||||||
|
m.Option("message", "login failure")
|
||||||
|
} else {
|
||||||
|
m.Option("username", aaa.Result(0))
|
||||||
|
msg := m.Spawn(m.Target()).Cmd("right", "check", aaa.Cap("group"), "command", "/upload", "file", m.Option("file"))
|
||||||
|
if msg.Result(0) == "ok" {
|
||||||
|
m.Option("right", aaa.Cap("group"))
|
||||||
|
} else {
|
||||||
|
m.Option("message", "your do not have the right of ", m.Option("file"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}},
|
||||||
"/login": &ctx.Command{Name: "/login", Help: "文件上传", Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) {
|
"/login": &ctx.Command{Name: "/login", Help: "文件上传", Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) {
|
||||||
w := m.Data["response"].(http.ResponseWriter)
|
w := m.Data["response"].(http.ResponseWriter)
|
||||||
msg := m.Find("aaa").Cmd("login", m.Option("username"), m.Option("password"))
|
msg := m.Find("aaa").Cmd("login", m.Option("username"), m.Option("password"))
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user