A quick way to save clipboard contents to a file
Jan 30, '04 08:39:00AM • Contributed by: kfaulhaber
Jan 30, '04 08:39:00AM • Contributed by: kfaulhaber
A bit of an expansion on this hint... add this to your ~/.[t]cshrc file:
alias save 'pbpaste > \!^ && echo "" >> \!^'
And now if you select some text in a window, copy it, and want to save it into a file, type save /path/to/file and there it is. The !^ is a bit of history substitution that means "take the first argument from the last command." In this case, the last command was save and the first argument was the file path entered after.
The echo part adds a new line to the end of the file and can be omitted.
•
[5,311 views]
