Follow mekdigital on Twitter

what's your filename ? TextMate

as easy as sudo rm -Rf / and you'll have the filename in your clipboard. removing the path to the file is optional but that's how I needed that day

#!/usr/bin/env ruby

`echo #{ENV['TM_FILEPATH'].split('/').last.strip} | pbcopy`

update

echo $TM_FILENAME | pbcopy

;) there is no need to invoke Ruby. There is no need to parse  TM_FILEPATH when you have TM_FILENAME...

published on 16 Aug

Comments (0)

Leave a comment...