Bash-completion, C64 Pico Amplifier and Laser cutting

Last Updated or created 2024-08-07

Worked on bash autocompletion for QP

source below script to get
qp <tab><tab> shortcode

Not happy with both versions yet …

#/usr/bin/env bash

# Version 0.1
qpcompl()
{
  COMPREPLY=($(compgen -W "$(qp | cut -f2 -d \' )" "${COMP_WORDS[1]}"))
}
complete -F qpcompl qp
--------------------------------------------------------------------------------------
# V 0.2
_qp_complete() {
    local cur prev opts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-2]}"
    opts="add del"

    case "${prev}" in
        add)
            COMPREPLY=( $(compgen -d -- ${cur} ))
            return 0
            ;;
        del)
            COMPREPLY=( $(compgen -f -- ${cur}) )
            return 0
            ;;
        *)
            COMPREPLY=( $(compgen -W "$(echo add; echo del ;echo "" ; qp)" -- ${cur}) )
            return 0
            ;;
    esac
}

complete -F _qp_complete -o nospace qp

Game controllers : left into right setup

My Bus Manipulator

And a Jigsaw in progress (with our own made clock in the background)

C64 Pico Amplifier

My C64 had a problem with previous attached speaker.
It drew too much current to drive. And random characters where printed.
Choosing another speaker and a minimal amplifier solved the issue.
(Thanks to Bigred finding the problem at Bornhack 2024)

My minimal amplifier for:

Using below mini speaker:

Spread the love

Leave a Reply

Your email address will not be published. Required fields are marked *