iterm annoying history window - autocomplete

I have recently changed my MAC and was setting my work environment from scratch. I have noticed that now I have a feature that I've never used before. When I press up arrow up a couple of times iterm basically chooses one of the previously used commands by itself and prompts the window with all the options I have used a specific command with. For instance I recently used ls with flags -lh -ls etc. I would like to get rid off this prompt as I cannot let's say press arrow up a couple of times to look for a different command I've previously used. Screenshot below for some clarification.
enter image description here

Related

How can I use the "PowerShell Integrated Console" in VS Code?

I have the PowerShell extension installed under VSCode. When I open up a PowerShell script, VS Code automatically pops open a "PowerShell Integrated Console" window in my terminal. It's different from the normal PowerShell terminal:
It's better than the default one because keyboard shortcuts like Ctrl+Backspace to delete a word work. But when I try to open one of these fancy terminals myself, the option isn't there:
How can I get one of these improved terminals without opening a script file, and how can I get VSCode to use them automatically instead of the old PS terminal?
Note:
Normally, a PIC (PowerShell Integrated Console) is automatically created the first time you open a PowerShell source-code file for editing in a session.
The instruction below show to how to directly create a PIC, which may also be helpful if you need to restart it after a crash - though you're usually prompted to create a new one when that happens.
Instruction as of v2022.12.1 of the PowerShell extension for VSCode (Visual Studio Code):
Execute the PowerShell: Show Session Menu command from the command palette (Ctrl-Shift-P).
This will create a PIC and show a submenu, which you can simply dismiss with Esc.
Note: If the PowerShell extension was already loaded but the PIC has crashed, choose Restart Current Session from the submenu instead.
Additionally, you may assign a keyboard shortcut to the command, by clicking the cog icon on the right edge of the command palette entry.
Because the PIC doesn't have an external executable entry point you can not define it as a custom shell profile (at least as of VSCode 1.67.1).
GitHub issue #3918 discusses implementing simpler ways to activate / load the PIC on demand as a future enhancement:
Making the PIC show in the list of available shells (as shown in your question, analogous to the extension-contributed JavaScript Debug Terminal entry) is one of the suggestions, but the concern is that there can only be one PIC as of this writing, so such an entry would behave differently from other shells in the list, which create a new session every time.
However, this concern would go away if support for multiple PICs were to be implemented, which is being proposed in GitHub issue #2418.

When I edit a file with EMACS I get a strange error. How do I fix this?

This is what I am doing:
Make a file or use an existing file.
Emacs filename.txt.
Type some new text into the file.
Save file.
After step 2, I receive an error after the emacs editor window pops up.
Here is the error:
2022-01-19 22:11:53.935 Emacs-x86_64-10_14[33893:994906] It's not
legal to call -layoutSubtreeIfNeeded on a view which is already being
laid out. If you are implementing the view's -layout method, you can
call -[super layout] instead. Break on void
_NSDetectedLayoutRecursion(void) to debug. This will be logged only once. This may break in the future.
I have already tried updating emacs and that didn't help, and googling didn't give me an answer. Currently, I have GNU Emacs 27.1 version.
How do I fix this error?
As far as I know you shouldn't need to "fix" the error at all and it won't cause any problems while you're actually running Emacs. In fact I'm somewhat surprised you see it at all.
I was only able to see the error (in both Emacs 27 and in pretest-28.0.90) only by running the Emacs binary (eg. ./Emacs-27.app/Contents/MacOS/Emacs) directly from a terminal, which isn't the normal way of starting Emacs on macOS. If you just run Emacs by starting it from Finder, the Dock, or via the "open" utility then you shouldn't see the error at all, and it shouldn't cause any problems.
The whole point of keyboard interaction (and emacs in particular) is that there's no need to touch the mouse. It's possible to log in (using e.g. ssh) and edit remotely, with no gui (so no way to drag and drop), and this is the 'normal' way of invoking emacs. Run 'emacs --help' from the command line to see a bunch of options. In particular see 'emacs --no-window-system' which uses a raw terminal even when a gui is available (no error message appears when it's run this way).
The gui however adds font and image support, which can be useful if you're sitting at the machine. The error message you get when you invoke 'emacs' from the command line in its default mode, with no arguments, is a diagnostic describing a bug in the mac gui implementation.
The error's still there if you start emacs through the finder; you can see that by running (e.g.)
$ open /Applications/Emacs.app/Contents/MacOS/Emacs-x86_64-10_14
which both opens an emacs gui and a terminal window containing the program's text output.
As it says in the message, 'this may break in the future'; it's not helpful to say 'you're using it wrong.'

Powershell output and "Run and Debug" terminal output corruption using "ConvertFrom-Json"

till yesterday I thought that I become an idiot, but this morning I was able to reproduce a problem that is affecting the "Run and Debug" terminal output in Vscode and Powershell
The output of the commands is displayed in the proper way as you can see here :
If I try to add the option "ConvertFrom-Json", the font color is changing to black as you can see here: .
The situation is even worst in Powershell (5.1.19041 and 7.0.3): the ouput become a huge black block.
I already tried to use another user and another computer with a different user profile, same issue (with different Windows 10 builds).

IPython's partial up-arrow search not working; Ctrl-P is fine

Our sysadmin recently updated us to OpenSUSE Leap 42.1. I immediately noticed that IPython's history search behaviour changed. Previously, if I typed part of a command then pressed Up, I could scroll through those commands in the history matching the part that I'd entered. This no longer works: Up just scrolls through the history one line at a time.
Using Ctrl-P to do the same thing still works perfectly but I'd like to restore that behaviour to Up if possible.
I didn't have a ~/.inputrc file, and I tried creating one with the contents
# arrow up
"\e[A":history-search-backward
# arrow down
"\e[B":history-search-forward
but that only added similar behavior to bash. Also, it means the ~/.inputrc suggested here doesn't work.
I'm using IPython version 3.2.2 and Python 2.7.9, if relevant. The Python readline package appears to be installed but I don't know what the install order was.

Shortcut for selecting run configuration in Eclipse IDE

I have an Eclipse workspace with a bunch of projects. I manually created some run configurations for each project (it's necessary to pass some arguments to VM, so I can't just run it directly, e.g. using shortcut ALT+SHIFT+X, T in the specific file).
Most of the time, I just use one run configuration (whereas for the first time I manually launch it using Run -> Run configurations -> (name) -> Run). Since I configured Eclipse to always run the last run configuration (on F11 or CTRL+F11), it's usually enough.
However, sometimes I need to switch to a different run configuration and then back to previous one and then to a different one etc. Is there a quick way to do it? I'd like to see a shortcut, which would display pop-up window with all existing run configurations. By typing first few letters, I'd find an appropriate one and would be able to immediately run it by pressing ENTER. I mean something similar to what CTRL+SHIFT+T or CTRL+SHIFT+R looks like.
I'm afraid there's not something like that. Nonetheless, any advice on how to get more effective would be greatly appreciated, because I'm bored of switching run configurations via menu (as I described above). I can press ALT+R, N and then select a run configuration using arrow keys, but it's not really that comfortable.
You already gave most of the answer yourself. Start by pressing ALT+R, N and then simply start typing the name of the configuration you want. The cursor should be positioned in the filter field and thus incrementally reduce the list of launch configurations as you type. When you've narrowed it down to 1, complete the selection by ALT+R.
BTW: thanks for the reminder, I, too, was using the mouse way too much in this particular use case. I will stop doing so, now that I gave the answer :)
Since Eclipse 4.12 (June 2019, 4 years later) you can also launch any of the Run or Debug configurations available in your workspace from... the Quick Access menu (Ctrl+3 shortcut)
Note: For performance reasons, the extra Quick Access entries are only visible if the org.eclipse.debug.ui bundle was already activated by some previous action in the workbench such as editing a launch configuration, or expanding the Run As... menus.