Skip to content

Instantly share code, notes, and snippets.

@elfsternberg
Created November 1, 2022 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elfsternberg/1e6c64e8601887af6dd4634f20227f3a to your computer and use it in GitHub Desktop.
Save elfsternberg/1e6c64e8601887af6dd4634f20227f3a to your computer and use it in GitHub Desktop.
Bash completions for MAME
MAME_ROM_PATH="$HOME/.local/share/mame/roms"
_mame_completions()
{
COMPLETIONS=$(echo $(ls "$MAME_ROM_PATH" | sed 's/\.zip$//i'))
COMPREPLY=$(compgen -W "$COMPLETIONS" "${COMP_WORDS[1]}")
}
complete -F _mame_completions mame
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment