#!/bin/bash

urldecode(){
  : "${*//+/ }"
  echo -e "${_//%/\\x}"
}

IFS=: read -r protocol xcwd cmd <<<"$1"
xcwd="$(urldecode "${xcwd:2}")"
cmd="$(urldecode "$cmd")"

open(){
  exo-open "$*"
}

set -e
cd
cd "$xcwd"
eval "$cmd"
