Add tea open (#101)
Fix open default to home page Improve path join and open with no arg add labels and milestones Add tea open Reviewed-on: https://gitea.com/gitea/tea/pulls/101 Reviewed-by: 6543 <6543@noreply.gitea.io> Reviewed-by: John Olheiser <john.olheiser@gmail.com>
This commit is contained in:
committed by
John Olheiser
parent
b37673c954
commit
7a10ea10df
50
vendor/github.com/skratchdot/open-golang/open/open.go
generated
vendored
Normal file
50
vendor/github.com/skratchdot/open-golang/open/open.go
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
|
||||
Open a file, directory, or URI using the OS's default
|
||||
application for that object type. Optionally, you can
|
||||
specify an application to use.
|
||||
|
||||
This is a proxy for the following commands:
|
||||
|
||||
OSX: "open"
|
||||
Windows: "start"
|
||||
Linux/Other: "xdg-open"
|
||||
|
||||
This is a golang port of the node.js module: https://github.com/pwnall/node-open
|
||||
|
||||
*/
|
||||
package open
|
||||
|
||||
/*
|
||||
Open a file, directory, or URI using the OS's default
|
||||
application for that object type. Wait for the open
|
||||
command to complete.
|
||||
*/
|
||||
func Run(input string) error {
|
||||
return open(input).Run()
|
||||
}
|
||||
|
||||
/*
|
||||
Open a file, directory, or URI using the OS's default
|
||||
application for that object type. Don't wait for the
|
||||
open command to complete.
|
||||
*/
|
||||
func Start(input string) error {
|
||||
return open(input).Start()
|
||||
}
|
||||
|
||||
/*
|
||||
Open a file, directory, or URI using the specified application.
|
||||
Wait for the open command to complete.
|
||||
*/
|
||||
func RunWith(input string, appName string) error {
|
||||
return openWith(input, appName).Run()
|
||||
}
|
||||
|
||||
/*
|
||||
Open a file, directory, or URI using the specified application.
|
||||
Don't wait for the open command to complete.
|
||||
*/
|
||||
func StartWith(input string, appName string) error {
|
||||
return openWith(input, appName).Start()
|
||||
}
|
||||
Reference in New Issue
Block a user