Mac Terminal Directory - macos

I realize my directory at the top is spelled wrongly and now I can't do any cmd on my terminal. How do I go about to change it back or undo it?
screenshot
The path is wrong

You likely need to edit your ~/.bash_profile and fix what is wrong there.
This file might be invisible, so when you open Finder, press CMD+Shift+. to make these files appear. You can press that combination again to hide them, after you're done.

In their terminal app go to Terminal > Preferences. Under "Shells open with," select "Command (complete path)," then enter the path /usr/bin/bash.

Related

How can I make Atom my default editor when I open a file from terminal?

Every time I open a file from the terminal it opens the file in Xcode.
open hashing.md then Xcode opens. I don't want it to open in Xcode.
How can I make my terminal open files in Atom instead?
I'm on a Mac, Monterey, 12.1.
(I'm at the point where I just want to uninstall Xcode, but, who knows, I may need it in the future.)
I see this suggestion from someone, but I don't know how to do it. How do I "add the following to my ~/.bashrc file?" What does that mean? Where is my ~/.bashrc file and how do I add to it?
Add the following to your ~/.bashrc file:
export EDITOR="/Applications/TextEdit.app/Contents/MacOS/TextEdit"
Open finder and look for a file with the extension you want to open using atom, ".md" for example.
Right click on it and go to "Get info". You should see an "Open With" tab. Click on it, choose atom and click on the "Change all" button. That will make it the default option to open any ".md" file.
In case you just want to open a certain file with atom, use the -a flag with the open command.
~% open -a atom file.md

To open a folder in Terminal

Is there any option to open the program files in Terminal(windows) directly from the folder's location in the drive, without actually typing all the commands to navigate and then executing it.
I guess "open in Terminal" option in present in Ubuntu;
You can achieve this in a number of ways.
Click on File at the top left corner of the current folder location. You will see Open Windows PowerShell option. Click on any option. It will open Power Shell and automatically navigate to the current folder.
Another option, Press Shift and Right Click. It will show Open PowerShell window here option.
If you are looking for Ubuntu-like terminal(bash) then you can install the Git terminal from here. Then, on right-click you will see Git Bash Here option.

iTerm2 click to open selected path

➜ ~ brew remove proxifier
==> Uninstalling Cask proxifier
Error: It seems there is already an App at '/usr/local/Caskroom/proxifier/2.22/Proxifier.app'.
Here's a common log, which contains a path and iTerm2 recognizes it, we can quickly open that path by holding down the Command key and clicking on it.
But what I want to ask is if there is a way to quickly open a selected part of the path. For example, when I use the cursor to select /usr/local/Caskroom/proxifier, is there any built-in way to quickly open it in the Finder in iTerm. For example, open it by clicking on it with Option + Command. I know this can be done with Automator, but before do that I'd like to know if there is a built-in way to fix it.
Hold the command (⌘) key on your keyboard and click on a filename or a path, it tries to open it. This can be enabled or disabled in iTerm2 Preferences

How to reset that open vim with a clean window in mac's terminal

I encounted a problem after I change the syntax of mac's terminal vim. Right now, when I open vim, it just shows up under many line's of my shell command (screenshot below) instead of like before open a clean window and cannot see my shell command. So how can I reset it back that open my vim that in a clean terminal window?
Finally find out that because of the TERM is not set to xterm, so I fixed this issue by adding export TERM=xterm-color in my .bash_profile file. If you have the same issue, hope this would help.

Terminal - How to open window at a certain directory

When I open Terminal on Mac, it starts in the root directory. I don't want to have to type cd to change my directory every time I open terminal, I want to be in that directory to begin with.
How do I make terminal start in a specific directory? Also, how do I make terminal always start full screen and in a particular color?
Also, what is the command to open text mate in terminal?
This perhaps better belongs on Ask Different, but here are two options to start a Terminal session at a particular location:
Open Terminal Preferences to the Settings section, and in the Window tab check the "Run command", and enter cd yourdirectorypath in the command field. It will automatically run for any new Terminal window.
Edit the ~/.bash_profile and add the cd yourdirectorypath line at the end.
As for starting fullscreen, if you quit Terminal with a fullscreen window open, it will launch that way.
You can set colour schemes in the preferences, there are many built-in "profiles".

Resources