From 876256da72a54995fc54cf63a5ac912fd1e6441c Mon Sep 17 00:00:00 2001 From: butlerx Date: Mon, 5 Oct 2020 18:03:52 +0100 Subject: [PATCH] recommend octal codes for download script --- docs/downloading-files.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/downloading-files.md b/docs/downloading-files.md index 37e2bd4..28e5ed0 100644 --- a/docs/downloading-files.md +++ b/docs/downloading-files.md @@ -7,13 +7,12 @@ The terminal escape sequences used are `^[[5i` and `^[[4i` (VT100 for "enter auto print" and "exit auto print" respectively - https://vt100.net/docs/tp83/appendixc.html). -An example of a helper script that prints the terminal escape characters and -base64s stdin: +To take advantage add the following bash function to your `.bashrc` ```bash -$ cat wetty-download.sh -#!/bin/sh -echo '^[[5i'$(cat /dev/stdin | base64)'^[[4i' +funtion wetty-download() { + echo "\033[5i"$(cat /dev/stdin | base64 -w 0)"\033[4i" +} ``` You are then able to download files via WeTTy!