mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
fix username on Android
This commit is contained in:
parent
2c73d5ced9
commit
f0b9378593
2 changed files with 9 additions and 1 deletions
|
@ -6,7 +6,11 @@ export LC_ALL="$LANG"
|
|||
if [[ -z "$USER" && -n "$USERNAME" ]]; then
|
||||
export USER="$USERNAME"
|
||||
fi
|
||||
export DEFAULT_USER="dmitmel"
|
||||
if is_android; then
|
||||
export DEFAULT_USER="$USER"
|
||||
else
|
||||
export DEFAULT_USER="dmitmel"
|
||||
fi
|
||||
|
||||
if [[ -n "$SSH_CONNECTION" ]]; then
|
||||
export EDITOR="rmate"
|
||||
|
|
|
@ -8,6 +8,10 @@ is_macos() {
|
|||
[[ "$OSTYPE" == darwin* ]]
|
||||
}
|
||||
|
||||
is_android() {
|
||||
[[ "$OSTYPE" == linux-android ]]
|
||||
}
|
||||
|
||||
command_exists() {
|
||||
command -v "$1" >/dev/null 2>&1
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue