Use Windows Terminal on PhpStorm? - windows

I would like to know how to use Windows Terminal on PhpStorm?
I went to "Settings> Terminal", and tried to change the terminal path to :
C:\Users\user\AppData\Local\Microsoft\WindowsApps\Microsoft.WindowsTerminal_8wekyb3d8bbwe\wt.exe
But no effects

I don't think it's possible: Windows Terminal is not a shell, it's a terminal emulator that has its own window/UI. It is just another front end to the existing shells that runs a shell (powershell, cmd, wsl) under the hood. PhpStorm provides its own terminal emulator in Terminal tool window. It's impossible to integrate one terminal emulator inside another, because all integration is based on parsing ANSI/VT sequences from underlying shell.

Related

xterm-256 support for git bash

I am trying to enable xterm 256 color via git bash. It turns out there are 2 ways to start a git bash in Windows.
windows cmd, run this git-cmd.exe --command=usr/bin/bash.exe -l -i
mintty, run git-bash.exe
However seems only the second one support 256 color. The following screenshot is executing result of cat AnsiColors256.ans AnsiColors256.ans.
But the downside of git-bash.exe is that it can't be integrated into integraded command line tool like ConEmu, as indicated on ConEMU Doc
Also, you may run in ConEmu tab git-bash.exe, but this is not recommended, because it runs mintty.exe, which is another terminal.
It actually start an new window instance.
My question is, is there any tweak to config cmd.exe to support 256 color like mintty.exe? I still want to use a single ConEMU instance for all my command line interfaces.
I am using windows git version git version 2.24.0.windows.2
It actually start an new window instance.
a simple "bash" would not start a new windows.
As for the CMD.exe, you might consider using instead the new Microsoft Terminal, as Microsoft/Terminal, which is more likely to support 24-bit colors.

Open a Graphical Window that uses Ncurses

Let's say I'm running xterm or some other terminal emulator on top of some graphical X Window Environment. xterm on KDE, for example. I want to write an application that may be called on the command line of one terminal emulator, and upon execution, the application creates a new KDE/Environment window, separate from the current terminal emulator, and on that new window run an Ncurses context for application purposes.
How would I do this? Is this terminal emulator dependent? Desktop environment dependent? Would I be using bare X window system calls?
It's terminal (emulator) dependent.
Curses runs in terminals and terminal emulators. Most of the latter (terminal emulators) have some way to tell what program (other than your shell) to run in the terminal emulator.
For instance, xterm can be told using the -e option,
-e program [ arguments ... ]
This option specifies the program (and its command line
arguments) to be run in the xterm window. It also sets the
window title and icon name to be the basename of the program
being executed if neither -T nor -n are given on the command
line.
NOTE: This must be the last option on the command line.
letting you start an xterm running MyApplication like this:
xterm -e MyApplication
Again, most of the terminal emulators you might run in X accept that option. KDE konsole does that. There's no manual, but
konsole --help-all
shows it at the end.

Erlang shell autocomplete not working on windows

When I'm opening erlang shell(in cmd or git bash), and try to use tab for autocomplete, it's just indenting. Can I make somehow make autocomplete working?
https://erlang.org/doc/man/erl.html :
Windows users probably want to use the werl program instead, which
runs in its own window with scrollbars and supports command-line
editing. The erl program on Windows provides no line editing in its
shell [...].

Codeception bash color output does not display

I have been testing with Codeception and PhantomJS for a while, but when ever i have to debug and run
vendor/bin/codecept run --debug
with colors set to true all i get is:
Modules: ←[33mWebDriver, AcceptanceHelper←[39m
and so on... So for some reason the color is just outputed in a raw format and is not working at all. Colors usually work. like when i use "ls --color" it just works.
My System is Windows 7 i'm using the "git bash" and i have also tried the regular "cmd" "powershell" and "cygqwin". Neither one of them seem to work with codeceoptions output.
So what is the problem? I'm clueless :(
in bash, try running
export TERM=ansi
or
export TERM=xterm
before running your program
or, to test color output from the shell itself:
echo -e "\e[41m\e[32mCOLOR\e[0m"
if that does work than it is the program, not the environment
finally, you might just need a better console.
try conemu, it has excellent ansi color support and i use it for cmd powershell bash perl and ssh sessions :)
http://sourceforge.net/projects/conemu/
Your application (Codeception) was not adapted to Windows console, which doesn't support ANSI colorizing. To enable ANSI colors you may choose one of the following options:
ConEmu is the Windows local terminal with ANSI capabilities and many other features like tabs, splits, preconfigured shell tasks, ... Also, it's the only terminal which able to "replace" default Windows console. Yep, I'm the author.
Some applications may work properly in mintty (bundled with cygwin or msys). Many native Windows console tools can't work properly in this terminal, but may be your app will be fine.
There is AnsiCon project. It enables ANSI colorizing in standard Windows console.
BTW, bash's ls (cygwin or msys) was adapted to Windows console API, so it doesn't post ANSI to terminal, unless terminal has done special initialization of POSIX subsystem. ConEmu can do this initialization via cygwin/msys connector.

powershell as gvim(vim) :shell

i'm on a Windows 7 machine and i've installed Gvim(win32 version not MinGW or something alike), i've written in my _vimrc
set shell=powershell.exe
Now when i type :shell command it must open a new buffer with powershell in it but instead it opens powershell in a new window.
Question : Is there a way to set Gvim ( configuration or plugin ) to open PowerShell in a buffer (like bash)?
Reread documentation for :shell and design-not. Quote from design-not:
Vim is not a shell or an Operating System. You will not be able to run a
shell inside Vim or use it to control a debugger. This should work the
other way around: Use Vim as a component from a shell or in an IDE.
A satirical way to say this: "Unlike Emacs, Vim does not attempt to include
everything but the kitchen sink, but some people say that you can clean one
with it. ;-)"
Of course, somebody does not like this. There are some projects that make it possible to run shell inside vim, most known is Conque which now has windows support. Note that it does not work with unicode.

Resources