From d8f82fc8141ecf2b7a09fa709da664676c5f2d02 Mon Sep 17 00:00:00 2001 From: SuperKaitoKid Date: Thu, 1 Jun 2017 13:21:28 -0700 Subject: [PATCH 1/4] Integrated Powershell support. --- README.md | 21 ++++++++++++++++-- default.png | Bin 0 -> 6635 bytes isPowerShell.png | Bin 0 -> 5018 bytes ...nal.cson => atom-terminal-powershell.cson} | 0 ...coffee => atom-terminal-powershell.coffee} | 17 ++++++++++---- menus/darwin.cson | 2 +- package.json | 14 ++++++------ 7 files changed, 40 insertions(+), 14 deletions(-) create mode 100644 default.png create mode 100644 isPowerShell.png rename keymaps/{atom-terminal.cson => atom-terminal-powershell.cson} (100%) rename lib/{atom-terminal.coffee => atom-terminal-powershell.coffee} (86%) diff --git a/README.md b/README.md index 9822ae0..751bb7b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,21 @@ -# atom-terminal +# atom-terminal-powershell + +## Difference from Atom-Terminal +Custom edit to atom-terminal plugin to support powershell out of the box. +Provides the same properties as the original plugin except defaults to Powershell. + +Original package can be found here: [https://github.com/karan/atom-terminal](https://github.com/karan/atom-terminal) + +![Default Powershell Option](https://raw.github.com/superkaitokid/atom-terminal-powershell/master/default.png) + +## Usage +If using Powershell, supply a Powershell executable and check the Is Powershell option. + +If using other terminals, uncheck Is Powershell option and follow normal atom-terminal usage. + +![Is PowerShell Option](https://raw.github.com/superkaitokid/atom-terminal-powershell/master/isPowerShell.png) + +## Original Atom-Terminal Instructions Open terminal on current file's directory with `ctrl-shift-t`. @@ -6,7 +23,7 @@ Open a terminal in the project's root directory with `alt-shift-t`. Keybindings: `ctrl-shift-t`, `alt-shift-t` -Install: `apm install atom-terminal` +Install: `apm install atom-terminal-powershell` Config: ```coffeescript diff --git a/default.png b/default.png new file mode 100644 index 0000000000000000000000000000000000000000..f7b92c46614fb9dfb9fdb3ec6ba3f597a948afaf GIT binary patch literal 6635 zcmch6XEa=E8#WlbF9ZecfPOa|3o}LQ2QF`-li%WqL zx*oxERb-iW+V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^}JpVyMrKb(OQ+C@n^8Wzkujoqv literal 0 HcmV?d00001 diff --git a/isPowerShell.png b/isPowerShell.png new file mode 100644 index 0000000000000000000000000000000000000000..1177b6eaa602f64733db1433d4aaaab62410c9b4 GIT binary patch literal 5018 zcmcgwS5y;hkVO=cqV&)NBoygYLI(*|!AS3cfCxh9T|yB^0!UR9X;Kvn5Q_97C6rJk z0xC^}+b6k>Rlo`;@_it6eeBR%u;Og@i* zE0@plm&xhadAbl}ZV0Brj9gzoFD`lL+|!|=s!3-!aiKY{>HLlCf~csjVgHE>{eJJ= zsHoUv@961RhC7j7$b3Kx3!0Q1kgoUgWGBnZHve0%1(Ax$O%F5LEn3ARNA zaFU;kg?1@Ty>j`^w|3F1y3H2vq3?;x^W7!9;OYzkA?4{Up#0fdCVsK>es$b6ps069 z1NJ6P>R!)-?5+NoQifb{08Grky)R4v>d@ScI9L&O(xM?QvHoxx=(x4X>x{aZzq3F1 zT&1AGkr&)cQ#AG5w^`+s8n9XLH31~6pQlh7o}U{x%o_>u;Wb~fXC)*2KhDVA_5l#% zzLo${+Y7**z~knQ{GNm*O(|)*iB`Wf&|}?tFZlKh4et z*Y)N3`gjGxYxrb1s$ZOy=n%ec@5lPGCJAJV)|BAv9|Kn5-`9rj;jzYhpzGd#_0NAx zVOZz05tWWcULqT8Gp*Tzml%%Z10M*o3C*7*>_;*?ye93?u8AS7V9{7@> z-S`PW9_oba=!RhbVtIRq{ib&UGy^|+oT(mhO%g2UQi76_w#NbUthokYj*hcZMMF`S zllR0QZF6mm$k=~@YgGLb*?cEekLmBficC42p0mc0p?{v5X&bl*Y8$xH9bsZ_xj;6a zEzwnM;%}9<`X>VIl9}(+WfbbrLxYJ+*U7P5b}i)_YVzx&^sPT^S}N+%4GpZdlRyLh z#^%5B$b3z7pgeL=+I`KmjIQQ6(w)%`!e$%%eyVtI~u- zhr-Q}-}#z70miuT8Pfp!ZA$8@s&~$>?>e|`Omj46aQS9kv*@5LF8!G;*qv)N8Vh#M zzS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;1qTd!=@4FK)Aznke!1AFRl zn~F}&lzitKC26@+iV)|eJuy#9xaLY`vPN9V*HJ|XYCh_i~Gqz9i zSFY`HF#zd{@@{}4<;%WWo~1QSH0E5)di+wtb=a>>ox!fuy7@5vt(uLkVk*gz2k_PW z2)VWC-(uLJ7hTu+mCW%%eKTl$R4FP-7+RSuDMkc>FA1CD>hg^54ENSRae*a|R~ADh zTu_*UWk1~oJ09o4nW~%$N8M!@$64x9ceGCY6ZUP_-*@$Qv0mm*3HYD@MY zHMXil?aKw@JZcJGbo$KV57f_O?a{puG?!E`^eTgHCT>$|=1F;wRHba z_5^b`NYHTcX33PNjeg9F2poO#IRQJ?mdK*7anHJ@G$Ym4peJdv%fQin(_fxWOp8@M zC#--=yrA>A_Nj$o*dlXbvjKjXU$?nP>-9bn#vmP}x-_2StcPD*cf0`FSldwjE4K>i zgMh7h4GF9G$sP?RczBFuibk?eQ8uK1Mx2p5KRF0T>q^M|n54?AtF=rQACRPLkS5yt!t!Bf ziU#ZfjoJ^cJEHcFU$$bW+nSJf#cA)S!V8|$yt&X#j_~0GM8@-rxYcJ?Zo^e>%E3<- zQ6VdgTYo^KK+7 # get options setWorkingDirectory = atom.config.get('atom-terminal.setWorkingDirectory') + isPowerShell = atom.config.get('atom-terminal.isPowerShell') surpressDirArg = atom.config.get('atom-terminal.surpressDirectoryArgument') runDirectly = atom.config.get('atom-terminal.MacWinRunDirectly') @@ -19,8 +20,10 @@ open_terminal = (dirpath) -> cmdline = "\"#{app}\" #{args}" # If we do not supress the directory argument, add the directory as an argument - if !surpressDirArg + if !surpressDirArg && !isPowerShell cmdline += " \"#{dirpath}\"" + else if !surpressDirArg && isPowerShell + cmdline += "-noexit -command \"cd \'#{dirpath}\'\"" # For mac, we prepend open -a unless we run it directly if platform() == "darwin" && !runDirectly @@ -65,10 +68,13 @@ if platform() == 'darwin' default: '' surpressDirectoryArgument: type: 'boolean' - default: false + default: true setWorkingDirectory: type: 'boolean' default: true + isPowerShell: + type: 'boolean' + default: true MacWinRunDirectly: type: 'boolean' default: false @@ -77,7 +83,7 @@ else if platform() == 'win32' module.exports.config = app: type: 'string' - default: 'C:\\Windows\\System32\\cmd.exe' + default: '%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\Windows PowerShell\\Windows PowerShell' args: type: 'string' default: '' @@ -87,6 +93,9 @@ else if platform() == 'win32' setWorkingDirectory: type: 'boolean' default: true + isPowerShell: + type: 'boolean' + default: true MacWinRunDirectly: type: 'boolean' default: false @@ -101,7 +110,7 @@ else default: '' surpressDirectoryArgument: type: 'boolean' - default: false + default: true setWorkingDirectory: type: 'boolean' default: true diff --git a/menus/darwin.cson b/menus/darwin.cson index 36bdb5d..b13059c 100644 --- a/menus/darwin.cson +++ b/menus/darwin.cson @@ -1,2 +1,2 @@ 'context-menu': - '.platform-darwin .tree-view': [{label: 'Open Terminal at Root', command: 'atom-terminal:open-project-root'}] + '.platform-darwin .tree-view': [{label: 'Open Terminal at Root', command: 'atom-terminal-powershell:open-project-root'}] diff --git a/package.json b/package.json index c8af193..ec160b7 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,15 @@ { - "name": "atom-terminal", - "main": "./lib/atom-terminal", - "version": "0.8.1", - "description": "Open terminal in the current file's directory.", + "name": "atom-terminal-powershell", + "main": "./lib/atom-terminal-powershell", + "version": "0.0.0", + "description": "Open powershell terminal in the current file's directory.", "activationCommands": { "atom-workspace": [ - "atom-terminal:open", - "atom-terminal:open-project-root" + "atom-terminal-terminal:open", + "atom-terminal-terminal:open-project-root" ] }, - "repository": "https://github.com/karan/atom-terminal", + "repository": "https://github.com/superkaitokid/atom-terminal-powershell", "license": "MIT", "engines": { "atom": ">0.50.0" From a0a43a47e5ddb37eadaa0114c8bb94ea0d65f1bc Mon Sep 17 00:00:00 2001 From: SuperKaitoKid Date: Thu, 1 Jun 2017 13:48:22 -0700 Subject: [PATCH 2/4] Prepare 1.0.0 release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ec160b7..b564eb4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "atom-terminal-powershell", "main": "./lib/atom-terminal-powershell", - "version": "0.0.0", + "version": "1.0.0", "description": "Open powershell terminal in the current file's directory.", "activationCommands": { "atom-workspace": [ From 8c8abb71df71520b7d4bc9c471122eb9adb446b2 Mon Sep 17 00:00:00 2001 From: SuperKaitoKid Date: Thu, 1 Jun 2017 14:06:27 -0700 Subject: [PATCH 3/4] Added bug fix for not able to start up due to file name. --- keymaps/atom-terminal-powershell.cson | 4 ++-- lib/atom-terminal-powershell.coffee | 25 ++++++++++++++----------- menus/win32.cson | 2 +- package.json | 4 ++-- 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/keymaps/atom-terminal-powershell.cson b/keymaps/atom-terminal-powershell.cson index cacbd19..e382b5d 100644 --- a/keymaps/atom-terminal-powershell.cson +++ b/keymaps/atom-terminal-powershell.cson @@ -8,5 +8,5 @@ # For more detailed documentation see # https://atom.io/docs/latest/advanced/keymaps 'atom-workspace': - 'ctrl-shift-t': 'atom-terminal:open' - 'alt-shift-t': 'atom-terminal:open-project-root' + 'ctrl-shift-t': 'atom-terminal-powershell:open' + 'alt-shift-t': 'atom-terminal-powershell:open-project-root' diff --git a/lib/atom-terminal-powershell.coffee b/lib/atom-terminal-powershell.coffee index cc8a5e5..c5f5449 100644 --- a/lib/atom-terminal-powershell.coffee +++ b/lib/atom-terminal-powershell.coffee @@ -7,23 +7,26 @@ platform = require('os').platform ### open_terminal = (dirpath) -> # Figure out the app and the arguments - app = atom.config.get('atom-terminal.app') - args = atom.config.get('atom-terminal.args') + app = atom.config.get('atom-terminal-powershell.app') + args = atom.config.get('atom-terminal-powershell.args') # get options - setWorkingDirectory = atom.config.get('atom-terminal.setWorkingDirectory') - isPowerShell = atom.config.get('atom-terminal.isPowerShell') - surpressDirArg = atom.config.get('atom-terminal.surpressDirectoryArgument') - runDirectly = atom.config.get('atom-terminal.MacWinRunDirectly') + setWorkingDirectory = atom.config.get('atom-terminal-powershell.setWorkingDirectory') + isPowerShell = atom.config.get('atom-terminal-powershell.isPowerShell') + surpressDirArg = atom.config.get('atom-terminal-powershell.surpressDirectoryArgument') + runDirectly = atom.config.get('atom-terminal-powershell.MacWinRunDirectly') # Start assembling the command line - cmdline = "\"#{app}\" #{args}" + if !isPowerShell + cmdline = "\"#{app}\" #{args}" + else + cmdline = "\"#{app}\" #{args} -noexit " # If we do not supress the directory argument, add the directory as an argument if !surpressDirArg && !isPowerShell cmdline += " \"#{dirpath}\"" else if !surpressDirArg && isPowerShell - cmdline += "-noexit -command \"cd \'#{dirpath}\'\"" + cmdline += "-command \"cd \'#{dirpath}\'\"" # For mac, we prepend open -a unless we run it directly if platform() == "darwin" && !runDirectly @@ -34,7 +37,7 @@ open_terminal = (dirpath) -> cmdline = "start \"\" " + cmdline # log the command so we have context if it fails - console.log("atom-terminal executing: ", cmdline) + console.log("atom-terminal-powershell executing: ", cmdline) # Set the working directory if configured if setWorkingDirectory @@ -45,8 +48,8 @@ open_terminal = (dirpath) -> module.exports = activate: -> - atom.commands.add "atom-workspace", "atom-terminal:open", => @open() - atom.commands.add "atom-workspace", "atom-terminal:open-project-root", => @openroot() + atom.commands.add "atom-workspace", "atom-terminal-powershell:open", => @open() + atom.commands.add "atom-workspace", "atom-terminal-powershell:open-project-root", => @openroot() open: -> editor = atom.workspace.getActivePaneItem() file = editor?.buffer?.file diff --git a/menus/win32.cson b/menus/win32.cson index 60a1d03..dd7290a 100644 --- a/menus/win32.cson +++ b/menus/win32.cson @@ -1,2 +1,2 @@ 'context-menu': - '.platform-win32 .tree-view': [{label: 'Open Terminal at Root', command: 'atom-terminal:open-project-root'}] + '.platform-win32 .tree-view': [{label: 'Open Terminal at Root', command: 'atom-terminal-powershell:open-project-root'}] diff --git a/package.json b/package.json index b564eb4..6cc776c 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "description": "Open powershell terminal in the current file's directory.", "activationCommands": { "atom-workspace": [ - "atom-terminal-terminal:open", - "atom-terminal-terminal:open-project-root" + "atom-terminal-powershell:open", + "atom-terminal-powershell:open-project-root" ] }, "repository": "https://github.com/superkaitokid/atom-terminal-powershell", From 08065c05fdde1bc3f013d77fa6609260f6b85344 Mon Sep 17 00:00:00 2001 From: SuperKaitoKid Date: Thu, 1 Jun 2017 14:06:42 -0700 Subject: [PATCH 4/4] Prepare 1.1.0 release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6cc776c..14a599d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "atom-terminal-powershell", "main": "./lib/atom-terminal-powershell", - "version": "1.0.0", + "version": "1.1.0", "description": "Open powershell terminal in the current file's directory.", "activationCommands": { "atom-workspace": [