Coder Social home page Coder Social logo

whackwhackterminal's Introduction

Build status

Building

Prerequisites

You need the following components installed in order to build WhackWhackTerminal

  • Visual Studio 2017 with extensibility workload
  • Node.js v8.9.4 LTS (32-bit)
  • Python 2.7
  • Visual C++ Build Tools 2015

Steps

Once you have the prerequisites you can begin setting up your project to build.

  1. Open a terminal window.
  2. Run npm config set msvs_version 2015
  3. Navigate to the Microsoft.VisualStudio.Terminal project directory
  4. Run npm install

After this you can simply open the solution file in Visual Studio and hit f5 to start debugging.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

whackwhackterminal's People

Contributors

hamiltonia avatar zoeyr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

whackwhackterminal's Issues

Initialization script

Lots of command-line build environments require an initialization script to be run to populate the shell with one-time goodness.

Having an entry in the options dialog to specify that and then pass it as a startup option to the shell would save a bit of time.

it would need to get re-run after an 'exit'.

Font

How to change font?

Upon closing solution, terminal leaves files in use

If you have a solution open and have Whack Whack Terminal open and then close the solution the solution's files are still in use. Even if you change the current directory in the terminal, files are still in use.

To reproduce:

  • Open a solution
  • Open the terminal
  • Close the solution
  • In the terminal, "cd "
  • In File Explorer, attempt to rename the solution directory

Terminal Restarting when Reloading Solution

After a change to the solution file has taken place and then subsequently reloaded, there is a forced reload of the terminal. This did not happen before, but the recent update causes this. It would not particularly be a problem, but it also clears the console screen and any history that you had would be gone.

Ideally. I would not want to have to use git reflog to look back history I am looking for while I am in the middle of a rebase or a collection of cherry-picks (speaking of git of course).

Was this an intentional change, or unintentional? If the former, what is the reason, it seems rather inconvenient.

Edit below is the text in the console

solution changed, restarting terminal in new directory

More than one Terminal Window

I would like to open the terminal window more than once.
Assuming I have a solution with more than one web project. I would like to have the option to open the terminal window for each project.
Or I have a web project and I like to run different processes on it, like linting, testing, serving, etc.

Sometimes terminal control doesn't get any input

Whack Whack terminal version: 1.0.14

Sometimes, maybe one time in 50, Whack Whack terminal doesn't get any user input and ignores all keystrokes though the control looks focused and the cursor is blinking. Clicking around in VS doesn't fix that, the only way to fix I found is to do Ctrl + Tab, switch active tool windows, and then switch back to the terminal.

Debugging the terminal code in this weird state shows that:

  1. Focus events seems to fire as expected.
  2. TermView.termData events do not fire.
  3. xterm AccessibilityManager._onChar do not fire.
  4. BetterBrowser.Browser_PreviewKeyDown do not fire.

Add MSBuild path to terminal?

Is it possible to add msbuild.exe to the terminal? It would be nice if I we can invoke msbuild commands straight from the terminal as well.

Or maybe we can add the 'Developer Command Prompt for VS 2017' as default shell.

PS Modules not loading in?

I notice in the screenshots, you have posh-git running. I have posh-git installed but it doesn't seem to be displaying in \\. When I run the Install-Module within \\ it errors saying that it's already installed. Is there something I need to do get it to work in \\?

`Alt` key does not work as expected for WSLBash & Powershell Emacs mode

For WSLBash, if hit keys that uses ALT such as to move forward or back one word (respectively ALT+f and ALT+b), delete forward or back one word (i.e. ALT+d and ALT+Backspace), etc. then focus moves to top menu bar of Visual Studio. Also, navigating the command history using Ctrl+n and Ctrl+p doesn't work either.

I also use PSReadLine module which provides emacs keybindings that are equivalent to what's used in bash. Same issue as well.

Related, perhaps have an escape key combo that moves the focus outside of the Terminal pane window (similar to how host key for VirtualBox works). Then maybe this avoids not being able to use ALT (or other common) keybindings and keeps the focus in the Terminal window. Perhaps Ctrl + \ Ctrl + \ can serve this function when in the Term window it could toggle focus back to main VS view? (Normally, Shift + Esc works to close most VS pane windows but it doesn't for the Terminal one)

Terminal opens in Solution, not Project

Visual Studio Pro
When the terminal opens its in the Solution folder, not the Project folder
Tried adding a startup command
cd $(ProjectDir)
But that did not work

Text is difficult to read when using Visual Studio "Blue" theme

When Visual Studio's theme is set to Blue or Blue (extra contrast), the text in the Terminal Window is difficult to read (e.g., yellow text on white background).
2017-10-10 10_02_53-trafficptrdotnet - microsoft visual studio

Isn't Blue the default theme of Visual Studio? It doesn't make a good first impression when the first thing I notice after installing this extension is that it's difficult to read.

For now I'll just switch to the Dark theme (since that's easier than editing the Whack Whack Terminal css file in the user settings).

how to change the opening directory ?

i have a site solution witch include a folder UI and inside the UI folder i have src folder and i want to open always on the src but for now its opening on the solution it self ?
how could i change this?

Command Terminal Window is unavailable

I am currently unable to bring up the terminal window via keyboard shortcut and have been unable to do so for some time. I don't remember when it stopped working (it was possibly around the 16.3 update), but it still does not work as of 16.3.5. The message on the bottom of the Visual Studio window states "The key combination (Ctrl+, Ctrl+) is bound to the command (Terminal Window) which is not currently available." When I add the View.TerminalWindow command to a menu item under View -> Other Windows, the Terminal Window option appears disabled. I am able to access it by using Visual Studio search, or by clicking on the tab if it is currently open.

Rare visual glitches

(PowerShell used)
Sometimes windows becomes fully empty, attempting to type text changes nothing. Still, commands seem to execute, if I type them blindly.
2019-05-29_17-48-57

Not really sure how to reproduce that. VS restart helps.

Esc in terminal window does not shift focus back to the document well.

From @clboles on July 28, 2017 14:22

In VS tool windows, the Esc key generally returns focus back to the previously active document. It would be nice if terminal window supported this as well since it's such a common muscle memory.

I wouldn't want to lose the behavior where Esc clears the input line in the terminal window, though. Perhaps Esc should be special cased to support both. If the user has typed input, then Esc should clear the line and keep focus in the terminal. If there is no input, then Esc could release focus from the tool window.

Copied from original issue: ZoeyR/WhackWhackTerminal#13

Add ability to change font colours

Please forgive me if this is already available, I couldn't see any options to do this when I tried out the terminal.

Because of the colour theme I use in VS (Solarized Light), when I use the Whack Whack terminal, I type out the Powershell cmdlets which appear in a yellow colour. This is very hard to see since the background colour of the terminal is also a light colour due to the theme.

Can the terminal colours be changed? If not, could this be something that is added in a future release please?

Terminal Window's content is blocked as default

Windows 10 Enterprise 16299
Visual Studio Community 2017

Terminal Window is shown like a IE page running on local html and the active contents are blocked by default, Every time I open Visual Studio 2017 I need to reclick the "Allow blocked contents" to enable this extension. I tried to set the IE settings but it seems not applying to Visual Studio.
Is there any way to block this message and let the "active contents" automatically run without any security prompt?

Can not load profile.ps1

First; Thanks for developing this! The terminal in Visual Studio have alaways been sub-standard. This looks very promising!

When I launch the terminal I says my system does not allow running scripts.
capture

But this setting for ExecutionPolicy on my machine is is RemoteSigned - so I am wondering. Why would WhatWhackTerminal behave differently than the standard PowerShell terminal in terms of the permission?

TerminalRenderer API

Suggestion: Provider TerminalRenderer API.

Reason:
Sometimes Whack Whack terminal may be used only as UI to render some ANSI terminal running somewhere else. In this case, only data stream may be available. A solution to this so far has been to pipe this stream through stdio of a broker console app, and make Whack Whack run this app.

This solution doesn't work prior to Windows 10 because Windows doesn't support ANSI. Any ANSI escape chars got transformed into garbage when winpty (in node-pty) reads them from the console buffer of the broker app.

The suggestion:

Provide an analog of TerminalRenderer API as in this VSCode Suggestion that would allow to:

  • Write data to xterm
  • Fire an event when user inputs data in xterm
  • Fire an event when user resizes the terminal window

Additionally, external terminal may not follow the xterm's window size and has its own dimensions.
Ideally, the TerminalRenderer API would need to account for that by:

  • Allowing xterm UI control to have specified size and do not auto fit the tool window
  • Allow callers to resize the xterm control

PATH and other environment variables convolute between sessions

It seems the terminal when opened under subsequent, but concurrent Visual Studio sessions gets environment from the first one that was open.

Reproduction:

  1. On cmd, set PATH=c:\foo\bar;%PATH%, run devenv
  2. Open Whack Whack on VS, and notice the PATH is as expected.
  3. Leave it open.
  4. On ANOTHER cmd, set PATH=c:\bar\grill;%PATH%, run devenv
  5. Open Whack Whack on that new VS, while the other unrelated VS session is running. And notice the PATH has c:\foo\bar, but not c:\bar\grill.

Note: Issue #6 is talking about a similar symptom (I think). However, typing exit on the terminal of the second devenv does not fix this issue. When the terminal comes back open, it is still using the environment from the first session.

Font size incorrect

I assume this is an issue with DPI settings, but after upgrading to Visual Studio 2017 15.6 the custom CSS options have been removed and replaced with a font-size selector that doesn't work.

This is a 10pt font on a Surface Book.
image

Use Whack Whack as target for console applications

It would be awesome if I could use this as a target for console apps. Current default VS behavior for debugging console apps is to launch a native windows console, execute the project, then close the console on program exit. It order to prevent closing the terminal and see the output of the program, you usually have to do something like set a breakpoint, use Console.ReadLine(), or run without debugging. Even with that, the launching of the console breaks you out of the IDE, hides the code you were just looking at with the launched console, and generally is disruptive to flow.

The desired functionality would be that when I either "Start Debugging" or "Start without Debugging" on a console project, the "Terminal Window" panel would gain focus and provide console interaction with the console app.

Switch to 64-bit shells

Currently we launch the 32-bit variants of the shells. We should change this to launch 64-bit variants.

Activating Alt key shortcuts prints the character in the terminal

When I press Alt+W (to access the Window menu - to Dock/Float/etc), it prints a 'w' character in the terminal. When I press Alt+F, it prints an 'f'.
Can we have VS handle all Alt key shortcuts and not pass any to the terminal?

(Not sure if that's a good idea. I couldn't think of any reason to use an Alt shortcut in the terminal.)

Customize colors

From @thomaslevesque on August 4, 2017 13:9

Is there a way to customize the colors? Apparently they're based on the VS color theme, but some colors are completely unreadable in the Light and Blue themes (e.g. yellow text on white background).

Copied from original issue: ZoeyR/WhackWhackTerminal#18

Doesn't seem to work with Git Bash

VS2019 16.1.1
WhackWhack 1.2.7.30024
Git for Windows 2.21.0.windows.1

I have Default Shell set to Other, and Shell Path set to "C:\Program Files\Git\git-bash.exe"

When I open the terminal window, I get a blinking block cursor in the upper left, and nothing else -- I'm not able to type in the terminal.

Layout issue when panel is docked and visual studio has been shutdown and restarted

There is a small layout issue when using the terminal.
It is not always the case

Steps to reproduce:

  1. Open whackwhack terminal and dock it to the bottom next to "error list" and "output window"
  2. Shutdown visual studio
  3. Start visual studio by loading an sln file.
  4. The terminal is loaded but the path of your current location is loaded in a very small column with the size of one character and is not readable

It is reolved by reloading visual studio by for instance a timesaver extension in visual studio

Add support for ANSI escape codes for colors

ANSI escape codes are used by many console applications to specify the color of the output. Currently, WhackWhackTerminal doesn't support those codes, and outputs the escape sequences instead.

Expected result in the standard Powershell console (conhost):
conhostoutput

Actual result in WhackWhackTerminal:
whackwhackoutput

(this is the output produced by simple-targets-csx)

Visual Studio Pro 2019 bash.exe terminal blank and unresponsive

When attempting to use any terminal (though my preference is using git bash's bash.exe - I use the same configuration in Visual Studio Code)

I get a completely blank, unresponsive, terminal. I've tried turning the "Change to current solution" to false, but that also has not solved my problem. This problem occurs with Powershell, CMD, WSL Bash, and the "OTHER" option (pointed to git bash's bash.exe)

Any thoughts?

Input lag

When using WSLBash as the shell, typing feels sluggish. Typing feels sluggish with other shells too. Input characters can take up to a whole second to appear on the screen.

Ctrl+O brings file open dialog, but after opening a file the window is no longer a terminal

Repro:

  1. Open the terminal
  2. Hit Ctrl+O
  3. Browse to any text file
  4. Hit or to open

Result:

  • Text file is rendered in the console
    • There seems no way to go back to the interactive console
    • The only way to recover seems to be to restart Visual Studio

Expected:

  • For my scenario it would be nice if Ctrl+O was not handled at all and the main VS shell would handle the open the file command.

German keyboard binding for starting the terminal

It took me a while to figure out that on a german keyboard the command to start the terminal is Ctrl + ^ (twice). That's because the "keyboard-aware" key VK_OEM_5 is used.

It would have made starting to use this extension a lot easier/faster if it were documented on the marketplace page or in the ReadMe of this repo. I know that one can always inspect the keyboard-bindings in visual studio or browse the source but it feels a bit complicated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.