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
406 B
Bash
Raw Normal View History

2023-12-07 04:02:47 +03:00
# Start an Android emulator.
2023-12-07 05:11:26 +03:00
# Default name is `default`.
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}"
2023-12-07 04:02:47 +03:00
[[ "${name}" = "" ]] && name="default"
${ANDROID_SDK_ROOT}/emulator/emulator -avd "${name}" &> /dev/null & disown
2023-12-07 00:42:06 +03:00
}
function _android_emulators() {
_autocomplete_first $(ls --classify .android/avd/ | grep \/$ | sed -e "s/.avd\/$//")
}
complete -F _android_emulators emulator