#!/bin/sh # original file: # https://gist.github.com/gerardroche/6e46cbdf8da19a39f9da set -e unset CDPATH unset IFS [ $( uname -s ) = "Darwin" ] && ST3_PATH=~/Library/Application\ Support/Sublime\ Text\ 3 [ $( uname -s ) = "Linux" ] && ST3_PATH=~/.config/sublime-text-3 echo "[*] remove cache..." rm -rfv "${ST3_PATH}"/Packages/.logs/ rm -rfv "${ST3_PATH}"/Backup/ rm -rfv "${ST3_PATH}"/Cache/ rm -rfv "${ST3_PATH}"/Index/ rm -rfv "${ST3_PATH}"/Settings/ echo "[*] remove sesions..." rm -fv "${ST3_PATH}"/Local/*.sublime_session echo "[*] remove workspaces..." sudo find / -type f -name '*.sublime-workspace' -exec rm -fv {} + 2>/dev/null echo "[*] sublime-clean: Done." exit 0