From e5469f5aa81514043b02d5839aa762678c47d3b9 Mon Sep 17 00:00:00 2001 From: MorganGeek Date: Tue, 14 Jul 2020 15:18:57 +0200 Subject: [PATCH] feature: bash substring f(x) for textual input --- dot_zsh_functions | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dot_zsh_functions b/dot_zsh_functions index e3e26bf..f0ac1b5 100644 --- a/dot_zsh_functions +++ b/dot_zsh_functions @@ -31,6 +31,13 @@ bold() { note() { printf "${underline}${bold}${blue}Note:${reset} ${blue}%s${reset}\n" "$@" } +function substring() { + local _length=${#1} + local _start=${2} + local _end=${3} + echo ${1:_start:_length-_end} +} + # Browser interaction utilities function browse() {