Skip to content

Commit

Permalink
utility, helper: add aliases to use with termux terminal emulator (an…
Browse files Browse the repository at this point in the history
…droid) (sorin-ionescu#1859)
  • Loading branch information
RIT80 authored and RIT80 committed Jul 20, 2020
1 parent f29305a commit 846b09f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/helper/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,8 @@ function is-bsd {
function is-cygwin {
[[ "$OSTYPE" == cygwin* ]]
}

# is true on termux (Android)
function is-termux {
[[ "$OSTYPE" == linux-android ]]
}
4 changes: 4 additions & 0 deletions modules/utility/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit 846b09f

Please sign in to comment.