Sitemap
Mike

Mike

I build distributed systems and real-time data pipelines. 10+ years in backend engineering. Focused on Kafka, microservices, and high-load systems. #golang

A tiny Oh My Zsh plugin that copies the MR link on push

1 min readOct 1, 2026

Hi there.

I didn’t plan to write here, but today I learned something xD At least I remembered bash!

More than 12 years ago I wrote some bash scripts for deployments, checks, and other little things.

Look at the tricks I picked up: `”$@”` gets the arguments of a function. You pass something in, and `$@` holds all of it. You can also take arguments one by one with `$1`, `$2`. You’ve seen that syntax somewhere, right? ;)

Also `head -n X`. One of the first commands you learn on Linux, right? (`cd` is probably the first.)

But the coolest part is copying to the clipboard. It looks like real magic. What do we have here? `wl-copy`, `xclip`, `xsel`. Oh My Zsh already has an abstraction for that: `clipcopy`. Use it!

Get Mike’s stories in your inbox

Join Medium for free to get updates from this writer.

And `grep`! I haven’t written a regular expression since 2018, or earlier. Really.

So I joined copy + grep + head + git + zsh. Did you know that git writes to stderr? (`2>&1` sends stderr to stdout.)

You probably think I made it up.

I wrote a function that copies the MR link when I push. So instead of copying it with the mouse, I just open the browser and hit `Ctrl+V`. Voylla.

This post has more text than the function itself :)
If you use Oh My Zsh, install it and use it. It’s free!

Oh, and also: not all Git hosts send the link. Keep that in mind!

Use it.

--

--

Mike
Mike

Written by Mike

I build distributed systems and real-time data pipelines. 10+ years in backend engineering. Focused on Kafka, microservices, and high-load systems. #golang