forked from adolfopa/miscutils
Send OSC escape sequences
This commit is contained in:
18
osc
Executable file
18
osc
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user