Skip to content

Instantly share code, notes, and snippets.

@Kreyren
Last active June 6, 2020 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kreyren/7a56f18c9d36af8b58bc26761ce8b452 to your computer and use it in GitHub Desktop.
Save Kreyren/7a56f18c9d36af8b58bc26761ce8b452 to your computer and use it in GitHub Desktop.
Shell function to generate colored paste url

This is a function designed for 'bashrc' to pipe command output with colors

NOTE: Command used has to support piping of colors Example usage: some program with colors | kix

kix() {	printf 'Paste is present on: %s\n' "https://rust-lang.github.io/rust-log-analyzer/log-viewer/#https://cors-anywhere.herokuapp.com/$(curl -n -F 'f:1=<-' http://ix.io 2>/dev/null)" ;}

Example output:

kreyren@leonid:~$ cave -c y show mesa | kix
Paste is present on: https://rust-lang.github.io/rust-log-analyzer/log-viewer/#https://cors-anywhere.herokuapp.com/http://ix.io/2oqu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment