Timeout command on Mac OS X?

You can use brew install coreutils And then whenever you need timeout, use gtimeout ..instead. To explain why here’s a snippet from the Homebrew Caveats section: Caveats All commands have been installed with the prefix ‘g’. If you really need to use these commands with their normal names, you can add a “gnubin” directory to … Read more

Where to place $PATH variable assertions in zsh?

tl;dr version: use ~/.zshrc And read the man page to understand the differences between: ~/.zshrc, ~/.zshenv and ~/.zprofile. Regarding my comment In my comment attached to the answer kev gave, I said: This seems to be incorrect – /etc/profile isn’t listed in any zsh documentation I can find. This turns out to be partially incorrect: … Read more

Mac Terminal – ‘pointer being freed was not allocated’ error when opening terminal

It looks like you don’t have the right permissions on the /usr/bin directory. Solution for OS X 10.11 (El Capitan) and later: Install Onyx 3.1.3 app (Free analog of Disk Utility) Choose ‘Maintenance’ -> ‘Permissions’ -> ‘Execute’. Solution for older versions of OS X: Open ‘Disk Utility’ app -> Press ‘Repair Disk Permissions’. It will … Read more

OS X Terminal UTF-8 issues

For me, this helped: I checked locale on my local shell in terminal $ locale LANG=”cs_CZ.UTF-8″ LC_COLLATE=”cs_CZ.UTF-8″ Then connected to any remote host I am using via ssh and edited file /etc/profile as root – at the end I added line: export LANG=cs_CZ.UTF-8 After next connection it works fine in bash, ls and nano.

How do I create a Bash alias?

You can add an alias or a function in your startup script file. Usually this is .bashrc, .bash_login or .profile file in your home directory. Since these files are hidden you will have to do an ls -a to list them. If you don’t have one you can create one. If I remember correctly, when … Read more

How to map a custom protocol to an application on the Mac?

I’ve not had occasion to use it, but some time ago I bookmarked OS X URL handler to open links to local files which is exactly what you’re looking for. The important part of the linked procedure is adding an appropriate CFBundleURLTypes to your application’s Info.plist that describes the scheme. The example given there looks … Read more