下面由sublime教程欄目給大家介紹關于Sublime Terminal插件Win7下怎么更改Powershell為CMD,希望對需要的朋友有所幫助!
Sublime Terminal插件Win7下更改Powershell為CMD

至于為什么要更改,我想你肯定也和我一樣,不想裝Powershell,盡管它很強大,很強大...
話不多說,需要的請看操作:
找到插件安裝位置,修改”Terminal.py”文件:
if os.name == 'nt': # if os.path.exists(os.environ['SYSTEMROOT'] + # '\\System32\\WindowsPowerShell\\v1.0\\powershell.exe'): # # This mimics the default powershell colors since calling # # subprocess.POpen() ends up acting like launching powershell # # from cmd.exe. Normally the size and color are inherited # # from cmd.exe, but this creates a custom mapping, and then # # the LaunchPowerShell.bat file adjusts some other settings. # key_string = 'Console\\%SystemRoot%_system32_' + # 'WindowsPowerShell_v1.0_powershell.exe' # try: # key = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, # key_string) # except (WindowsError): # key = _winreg.CreateKey(_winreg.HKEY_CURRENT_USER, # key_string) # _winreg.SetValueEx(key, 'ColorTable05', 0, # _winreg.REG_DWORD, 5645313) # _winreg.SetValueEx(key, 'ColorTable06', 0, # _winreg.REG_DWORD, 15789550) # default = os.path.join(package_dir, 'PS.bat') # sublime_terminal_path = os.path.join(sublime.packages_path(), installed_dir) # # This should turn the path into an 8.3-style path, getting around unicode # # issues and spaces # buf = create_unicode_buffer(512) # if windll.kernel32.GetShortPathNameW(sublime_terminal_path, buf, len(buf)): # sublime_terminal_path = buf.value # os.putenv('sublime_terminal_path', sublime_terminal_path.replace(' ', '` ')) # else : default = os.environ['SYSTEMROOT'] + '\\System32\\cmd.exe' elif sys.platform == 'darwin':想必小伙伴們已經看出來了,其實就是將Powershell判斷注釋掉,只要是Windows,就直接將Terminal路徑設置為cmd路徑。
新聞標題:Sublime怎么更改Powershell為CMD
本文鏈接:http://www.yijiale78.com/article6/cgheig.html
成都網站建設公司_創新互聯,為您提供App開發、小程序開發、關鍵詞優化、網站設計、營銷型網站建設、網站收錄
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯