According to Daniel Cassidy in his insane homage to Baron Munchhausen, How The Irish Invented Slang, the word dick, an obsolete slang term for a detective, derives from the Irish word dearc, meaning an eye. This is how the Great Fraud explains it:
“The Pinkerton’s world-famous logo was the giant ‘All-Seeing Eye.’ The Pinkerton private ‘eye’ and labor union spy was christened a dick (dearc, an eye) by the Irish-speaking subjects of its gaze: Molly Maguires, Fenians, Knights of Labor, and Wobblies.”
Whatever! I don’t know where the term comes from, though I would probably be most inclined to regard it as a corruption and shortening of ‘detective’. However, there are various ideas on the table and Grant Barrett goes through some of them in his treatment of Cassidy’s ‘research’: http://grantbarrett.com/humdinger-of-a-bad-irish-scholar
From my perspective, it is important that people realise that dearc is not a reasonable suggestion as the origin of this word. Firstly, dearc is pronounced jarrick in northern dialects and something like darrick in southern Irish. It is not the usual word for eye in Irish, which is súil. There is absolutely no evidence that Cassidy’s absurdly improbable claim is correct.