I installed something via Terminal (iterm2) on Mac and it showed a whole bunch of commands while installing. I need to look for a specific word to decide my next step?
What should I do?
Note:
I don't want to search a file. I want to search a text on the terminal output.
I cant use Ctrl + Shift + F. It for Ubuntu, not for Mac.
I don't use Terminator.
Damn it! Simply Ctrl + F works.
Edit: As #sojim2 pointed out in comments, it's CMD + F on mac.
Related
On the Windows Terminal, is there a way to repeat the last command by starting character, similar to the feature on a Unix Terminal?
For example, if I type the command cd .. then laster type !cd on a Unix Terminal, it will do the command cd .. again. However, I can't find this feature on the Windows Terminal.
EDIT: Here is the terminal I am using (as installed by Windows, no specific configurations):
EDIT: I am aware that pressing the up/down arrow can navigate the history of commands, but I am in a situation where I use a multitude of different commands and use the arrow keys every time can be tedious. Accessing last command by starting letter will be a lot more useful, similar to the ! command on Unix mentioned above.
Two Solutions
Ctrl + r, then type initial letter(s)
type initial letter(s), then F8
If you are using PowerShell or Bash on your Windows Terminal, you can use a feature called Reverse Search. This will go through your history backwards and show you the recently used command based on the starting characters.
In order to activate reverse search, press Ctrl + R on the terminal and type out the initial characters and watch the recent command appear.
Bonus tip: You can press Ctrl + R further to show next recent command
Note: This does not work for Command Prompt (cmd.exe)
I have a basic question on lldb in Xcode.
When using lldb in Xcode, how you guys call the command previously executed ?
Typing the same command every time is very frustrated to me, and
now looking the way to call them in efficient way.
I know "command history" will list the command with the number,
and the $ will execute the command.
But is there something similar like ctrl-p/ctrl-n or ctrl-r in bash
to show or search the previous commands ?
(lldb command running on terminal (not build-in lldb inside
Xcode) can do this.)
I'm using Xcode version 11.5(11E608c).
Use up arrow in the LLDB command prompt. It works similar to Terminal in that regard.
Type Ctrl R and then type part of the command you want. It'll display the first matching command. Keep typing Ctrl R and it will cycle through previous matching commands.
When I paste text into the Terminal window, Terminal appends 0~ before the pasted string and 1~ after it. I've never seen this behaviour before. If I copy foo from anywhere (including the same Terminal window), pasting into the command line results in:
-bash-4.2$ 0~foo1~
I tried every method for pasting text into OS X terminal from How to paste into a terminal?, i.,e.
Command v; CommandControlv; Shift + Insert.
Pasting into text editors and browsers (basically, any place other than Terminal) does not add any extra characters. Why is this happening and how can I fix it?
I'm using macOS 10.14.2; Terminal version 2.9.1.
I don't know the actual answer for this but for me it works after restarting the terminal.
Command + Q
I will update once I will find something.
I'm reading this book and I really do not understand what this author is talking about. It appears that you can program your mac to go forward one character by either hitting l or ^F. I do not understand the difference between emac key stroke and vim keystroke. He also says run this command and 'place it in your $HOME/.bash_profile but I cannot figure out how to place the command in the bas_profile.
The Author is talking about make you terminal console behaves like vi, this means typing set -o vi in your terminal, the console will work similar vi. So you will be able to navigate using the motion keys of vi, use INSERT mode, x to delete, etc.
You can set that permanently if you include this command in your ~/.bash_profile file.
If you are not sure what it does, I don't recommend so.
I want to map my NERDTREE toggle to Cmd + space but I don't know what character represents Mac's command key in .vimrc. I searched and found that we can use 'D' to represent cmd key from this link, but it doesn't work.
BTW I am using vim from the terminal not MacVim.
iTerm2 can do this - here I mapped command enter to :wq
It is true that <D- maps to command key. You can see it by :help <D-.
However, this will not work in your vim+terminal. It only works in MacVim. See here
The best shot for your intention is to map the combination as hex code, sending to terminal.
Still I will not recommend doing this. command is too important for mac os environment. For example, anyone uses an input method can't map it to command+space.\
Please consider using the usual method here: <leader>.
With IdeaVim you can use: <M-*>, for example <M-c> means Cmd + c
An example of mapping CMD+p to vim's Meta P to call :CtrlP command.
This has the advantage that Meta is usually not used for anything so it won't clash with existing commands.
And on .vimrc you'd add
map <M-p> :CtrlP<CR>