nix/home/program/bash/module/Android.nix

22 lines
484 B
Nix
Raw Normal View History

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