Add Commend Export

This commit is contained in:
Nobel
2017-01-12 14:55:06 +08:00
parent 58c5befa04
commit 913e1cc0bc
3 changed files with 10 additions and 1 deletions

View File

@ -28,7 +28,7 @@ class HTTPPreferencesWindowController: NSWindowController, NSWindowDelegate {
}
@IBAction func copyExportCommand(_ sender: Any) {
let command = "export http_proxy=http://\(address.stringValue):\(port.stringValue)"
let command = "export http_proxy=http://\(address.stringValue):\(port.stringValue);export https_proxy=http://\(address.stringValue):\(port.stringValue);"
NSPasteboard.general().clearContents()
NSPasteboard.general().setString(command, forType: NSStringPboardType)
let notification = NSUserNotification()

View File

@ -13,3 +13,6 @@
/* Class = "NSButtonCell"; title = "Follow Global Mode"; ObjectID = "ofk-Pc-c8f"; */
"ofk-Pc-c8f.title" = "跟随全局模式";
/* Class = "NSButton"; title = "Copy Shell Export Command"; ObjectID = "ySG-BC-5r0"; */
"ySG-BC-5r0.title" = "复制终端 Export 命令";

View File

@ -59,3 +59,9 @@
"Manual" = "手动";
"Show Running Mode On Status Bar" = "在状态栏显示运行模式";
/*
* ./HTTPPreferencesWindowController.swift
*/
"Export Command Copied." = "Export 命令已复制至剪贴板";