Copy last command in shell history to clipboard
More command line clipboard functionality. This shell function copies the last line in your shell history to the clipboard.
# Copy last command from shell history into clipboard
function cl() {
fc -ln | tail -1 | tr --delete "\n" | xclip -selection clipboard
}