Skip to content

Instantly share code, notes, and snippets.

@esycat
esycat / README.md
Last active October 30, 2023 10:52
How to get GNU's readlink -f behavior on OS X.

readlink.sh is a pure shell implementation that uses dirname, basename, readlink and pwd utils. Note that you cannot rename it to just readlink as then the script will call itself instead of the system utility.

realpath script simply calls Python's os.path.realpath. Python is provided in OS X and major Linux distributions. You can use instead of the system utility by making a symlink: ln -s realpath readlink.

Another way is to install coreutils package via Homebrew or MacPorts and use greadlink.

The code is taken from the following page on StackOverflow: http://goo.gl/Yw9OY

@esycat
esycat / .vimrc
Last active December 15, 2015 15:08
My Vim config file.
" Don't be compatible with Vi
set nocompatible
" Indentation style
set autoindent
"set smartindent
"set cindent
" Tab behavior
set tabstop=4