utility, helper: add aliases to use with termux terminal emulator (android) (#1859)

This commit is contained in:
Austin Sloane 2020-07-20 16:07:53 -07:00 committed by GitHub
parent c21295b27f
commit 4e7ab4b8b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -49,3 +49,8 @@ function is-bsd {
function is-cygwin {
[[ "$OSTYPE" == cygwin* ]]
}
# is true on termux (Android)
function is-termux {
[[ "$OSTYPE" == linux-android ]]
}

View File

@ -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'