#!/usr/bin/env bash open-with-os(){ if [[ -z "$1" ]]; then echo '$1 is empty.' exit fi if [[ "$(uname)" == "Darwin" ]]; then open "$1" else xdg-open "$1" fi }