Quick clinical logic: Onychomycosis is a dermatophyte nail infection, so pick the agent that is both fungicidal for dermatophytes and accumulates in keratin.
Terbinafine, an allylamine, inhibits squalene epoxidase and is fungicidal against dermatophytes. It binds nail keratin and stays there long after stopping, giving the best mycological cure, so it is the drug of choice.
Why not the others: Nystatin is a topical polyene effective only for Candida, useless for dermatophyte nails. Fluconazole has weaker activity for this indication. Itraconazole works well and is the main backup (pulse regimen), but terbinafine still edges it out as first-line for dermatophyte onychomycosis.
Exam pearl: terbinafine for toenail dermatophyte infection; itraconazole when Candida or non-dermatophyte molds are involved.
Ref: standard antifungal therapy guidelines.