Tag Info

Hot answers tagged

6

To know which shell are you using, use the following command: $ echo $SHELL It will return something like: /bin/bash or /bin/zsh After you know the shell, if the file .bashrc or .zshrc doesn't exist in your home directory (echo $HOME to find out), just create it. If you are using bash, you may have a file called .bash_profile where you can put your ...


3

Searching Google for "homebrew command-not-found" (without the quotes) one of the results was: Ubuntu’s command-not-found equivalent for Homebrew on OSX I have not personally tried using it, so I cannot comment on how well it may work.


3

You have saved your file as a Rich Text Format file (.rtf) In TextEdit.app Open your file and use the Make Plain Text menu to change it to the correct format for coding. Using anything other than plan text will mean that the file includes formatting code for styles and such that is visible to the shell layer but not to the user when viewing the file. ...


3

I haven't tested the answer by @klanomath, but there used to be a Python library to get the target of an alias, but Carbon support was removed from the Apple frameworks. It can be done in Objective C see http://stackoverflow.com/a/21151368/838253. The best bet is to use symlinks, but unfortunately Finder does not allow you to create these. I have written ...


2

To enable cd'ing into a folder alias I've found the following at Mac OS X Hints. Compile the source code below with the following command: gcc -o getTrueName -framework Carbon getTrueName.c This will create the ‘getTrueName’ executable in the same directory as the source. You can add it to your PATH, or just copy it directly to /usr/bin or /usr/local/bin ...


1

Here is my take on this. add and load this function to your .profile. function cd { thePath=`osascript <<EOD set toPath to "" tell application "Finder" set toPath to (POSIX file "$1") as alias set theKind to kind of toPath if theKind is "Alias" then set toPath to ((original item of toPath) as alias) end if end tell return ...


1

One option is to use zsh, which has a CORRECT option that will suggest commands with a "nearby" spelling. Personally, I use zsh and prezto, which results in this: It's nice because the command is red while typing if it's not a valid program name, which means I usually catch the typo before I even press enter. Valid command names are green, though, so I ...


1

Bot Sublime Text and Kaleidoscope are special cases as they install either a helper utility or themselves somewhere in your $PATH. The easiest way to open any application from /Applications is to run open -a APPNAME in Terminal, e.g. open -a Pages # opens Pages open -a "App Store" # opens the App Store


1

The Mono.framework neither belongs to Apple nor is it installed as a part of Xcode. I've cross-checked that with a VM (10.8.5/Xcode 5.1.1) Checking your profile i'd suspect it was installed with Xamarin (or another cross-platform dev environment). IMHO your Mono installation is hosed/got corrupted. A proper install looks like this (/Library/Frameworks): ...


1

Open Terminal and enter the following in a single line: /System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend There isn’t any confirmation, the desktop is immediately locked and the lock screen appears regardless of what is currently going on with the active user account. The menu item being used is the same Fast User ...


1

This is because apple zsh shell version. To install zsh version with that behaviour, you have to install homebrew. You can easily to it by typing the following: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" Once installed, install the zsh formulae: brew install zsh Then you have to replace your shell with zsh ...



Only top voted, non community-wiki answers of a minimum length are eligible