Skip to content

Instantly share code, notes, and snippets.

@jage
Last active August 29, 2015 14:26
Show Gist options
  • Save jage/95885c11b6b3adeffa2c to your computer and use it in GitHub Desktop.
Save jage/95885c11b6b3adeffa2c to your computer and use it in GitHub Desktop.

My prompt has some information in the far right, which is superuseful and pretty but not that nice when copying command output to share with my co-workers.

Example from the clipboard:

$ uptime                                                        jage@11D0D585 ~
22:46  up  1:14, 2 users, load averages: 1,74 1,85 1,70
$ date                                                          jage@11D0D585 ~
Tis  4 Aug 2015 22:46:08 CEST
$                                                               jage@11D0D585 ~

After running the sanitation script:

$ uptime
22:46  up  1:14, 2 users, load averages: 1,74 1,85 1,70
$ date
Tis  4 Aug 2015 22:46:08 CEST
$
# Sanitize output from my terminal, for OS X.
pbpaste | sed "s/[[:space:]]*${USER}@$(hostname -s).*$//g" | pbcopy
@jage
Copy link
Author

jage commented Aug 4, 2015

I'm using this through an Alfred workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment