#!/usr/bin/env ksh (( $# < 1 )) && exit 64 [[ -v X_OSC_DISABLE || ! -t 1 ]] && exit 0 case $1 in link) [[ -z $2 ]] && exit 64 printf "\e]8;%s\e\\" "$2" ;; pwd) (( $# != 1 )) && exit 64 printf "\e]7;file://%s%s\e\\" "$HOSTNAME" "$PWD" ;; title) (( $# == 1 )) && exit 64 shift; printf '\e]2;%s\e\\' "$*" ;; esac