Comment

Comment by JonahBraun

I think you posted this because pasting the OP results in a syntax error. The problem is actually the list in the compound command needs to be terminated with a newline or semicolon. Both of the following are equivalent correct oneliners:

clip() { [ -t 0 ] && pbpaste || pbcopy;}

function clip { [ -t 0 ] && pbpaste || pbcopy;}

parent JonahBraun 11 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton