From dc063da3105f11b4179897243c3e40a874185e9c Mon Sep 17 00:00:00 2001 From: tavo-wasd Date: Thu, 20 Jun 2024 01:33:44 -0600 Subject: [PATCH] termux fix --- shell/bashrc | 4 +++- shell/mkshrc | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/shell/bashrc b/shell/bashrc index 2f7e68f..8e51e66 100644 --- a/shell/bashrc +++ b/shell/bashrc @@ -105,8 +105,10 @@ alias \ img="cd $HOME/Pictures/ && ls" \ vid="cd $HOME/Videos/ && ls" \ +command -v exa >/dev/null 2>&1 && alias ls="exa -al --icons --group-directories-first --no-permissions --no-user --time-style=iso --git" \ +command -v eza >/dev/null 2>&1 && alias ls="eza -al --icons --group-directories-first --no-permissions --no-user --time-style=iso --git" \ + alias \ - ls="exa -al --icons --group-directories-first --no-permissions --no-user --time-style=iso --git" \ fzf="fzf --cycle --reverse" \ diff="diff --color=auto" \ grep="grep --color=auto" \ diff --git a/shell/mkshrc b/shell/mkshrc index 8ebced8..fbb6b8c 100644 --- a/shell/mkshrc +++ b/shell/mkshrc @@ -39,7 +39,7 @@ short_time() { } short_path() { - curr_path="$(pwd | sed 's/\/home\/[A-Za-z]*/~/g')" + curr_path="$(pwd | sed 's/\/data\/data\/com.termux\/files\/home/~/g;s/\/home\/[A-Za-z]*/~/g')" if [ "${#curr_path}" -gt 25 ] ; then curr_path="${curr_path##*/}" if git rev-parse --is-inside-work-tree >/dev/null 2>&1 ; then @@ -90,8 +90,10 @@ alias \ img="cd $HOME/Pictures/ && ls" \ vid="cd $HOME/Videos/ && ls" \ +command -v exa >/dev/null 2>&1 && alias ls="exa -al --icons --group-directories-first --no-permissions --no-user --time-style=iso --git" \ +command -v eza >/dev/null 2>&1 && alias ls="eza -al --icons --group-directories-first --no-permissions --no-user --time-style=iso --git" \ + alias \ - ls="exa -al --icons --group-directories-first --no-permissions --no-user --time-style=iso --git" \ fzf="fzf --cycle --reverse" \ diff="diff --color=auto" \ grep="grep --color=auto" \