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

# Start an Android emulator.
# Default name is `main`.
# Usage: emulator [NAME]
function emulator() {
local name="${1}"
[[ "${name}" = "" ]] && name="main"
steam-run ${ANDROID_SDK_ROOT}/emulator/emulator -avd "${name}" &> /dev/null & disown
}
function _android_emulators() {
_autocomplete_first $(ls --classify ~/.android/avd/ | grep \/$ | sed -e "s/.avd\/$//")
}
complete -F _android_emulators emulator