From ee1d011534244e42d9d0193e4b1a86580922ced7 Mon Sep 17 00:00:00 2001 From: Austin Sloane Date: Mon, 20 Jul 2020 16:07:53 -0700 Subject: [PATCH] utility, helper: add aliases to use with termux terminal emulator (android) (#1859) --- modules/helper/init.zsh | 5 +++++ modules/utility/init.zsh | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/modules/helper/init.zsh b/modules/helper/init.zsh index 6e83f89..0553556 100644 --- a/modules/helper/init.zsh +++ b/modules/helper/init.zsh @@ -49,3 +49,8 @@ function is-bsd { function is-cygwin { [[ "$OSTYPE" == cygwin* ]] } + +# is true on termux (Android) +function is-termux { + [[ "$OSTYPE" == linux-android ]] +} diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index caa0ec8..7bb7532 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -140,6 +140,10 @@ elif is-cygwin; then alias o='cygstart' alias pbcopy='tee > /dev/clipboard' alias pbpaste='cat /dev/clipboard' +elif is-termux; then + alias o='termux-open' + alias pbcopy='termux-clipboard-set' + alias pbpaste='termux-clipboard-get' else alias o='xdg-open'