fish/functions/__put_template.fish 440 B raw
1
function __put_template -d "base16-fish-shell private function"
2
  if test -n "$TMUX"
3
    printf '\033Ptmux;\033\033]4;%d;rgb:%s\033\033\\\\\033\\' $argv
4
  else if string match -q -- '*screen*' $TERM
5
    printf '\033P\033]4;%d;rgb:%s\007\033\\' $argv
6
  else if string match -q -- 'linux*' $TERM
7
    test $argv[1] -lt 16 && printf "\e]P%x%s" $argv[1] (echo $argv[2] | sed 's/\///g')
8
  else
9
    printf '\033]4;%d;rgb:%s\033\\' $argv
10
  end
11
end