This repository has been archived on 2024-03-04. You can view files and clone it, but cannot push or open issues or pull requests.
linux/.config/bash/module/Android.sh

17 lines
412 B
Bash
Raw Normal View History

2023-12-07 04:02:47 +03:00
# Start an Android emulator.
# Default name is `main`.
2023-12-07 04:02:47 +03:00
# Usage: emulator [NAME]
2023-12-07 01:44:42 +03:00
function emulator() {
2023-12-07 04:02:47 +03:00
local name="${1}"
[[ "${name}" = "" ]] && name="main"
2023-12-07 04:02:47 +03:00
2024-01-28 14:11:16 +03:00
steam-run ${ANDROID_SDK_ROOT}/emulator/emulator -avd "${name}" &> /dev/null & disown
2023-12-07 00:42:06 +03:00
}
function _android_emulators() {
2023-12-25 13:03:11 +03:00
_autocomplete_first $(ls --classify ~/.android/avd/ | grep \/$ | sed -e "s/.avd\/$//")
}
complete -F _android_emulators emulator