Created
January 20, 2017 21:34
-
-
Save loadedsith/0a2143717427eae2271d9e834129fb0b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh" | |
if [ -z ${TM_PROJECT_DIRECTORY+x} ]; then | |
echo -n "$TM_FILEPATH" | pbcopy | |
echo "$TM_FILEPATH"'\n Absolute path copied to clipboard' | |
else | |
TM_PROJECT_DIRECTORY="$TM_PROJECT_DIRECTORY/" | |
echo -n "${TM_FILEPATH#$TM_PROJECT_DIRECTORY}" | pbcopy | |
echo "${TM_FILEPATH#$TM_PROJECT_DIRECTORY}"'\n Project relative path copied to clipboard.' | |
fi; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment