Skip to content

Instantly share code, notes, and snippets.

@osmszk
Last active November 13, 2019 23:39
Show Gist options
  • Save osmszk/531ad8bee8802772d7abff51e104d5c4 to your computer and use it in GitHub Desktop.
Save osmszk/531ad8bee8802772d7abff51e104d5c4 to your computer and use it in GitHub Desktop.
bashrc
alias ll='ls -laG'
alias rm='rm -i'
alias f="open ."
cdf () {
finderPath=`osascript -e 'tell application "Finder"
try
set currentFolder to (folder of the front window as alias)
on error
set currentFolder to (path to desktop folder as alias)
end try
POSIX path of currentFolder
end tell'`;
cd "$finderPath"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment