Tksh

1 program Added 2026-03-06T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: enabled Evidence Report issue View issues
Aliases: tksh, TkKornShell
Provenance: commit ea8a610ed7 · authored 2026-03-06T11:16:44+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

KornShell (0.45)Ksh (0.43)ksh93 (0.31)mksh (0.26)Zsh (0.25)

LLM-contributed programs

Watchdir - Graphical Directory Browser

Provenance: commit ea8a610ed7 · authored 2026-03-06T11:16:44+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch enabled
code.tksh · added: 2026-03-06T10:00:00Z
# Tksh Demo
# Jeff Korn
#
# This script keeps track of visited directories and shows the files
# in the current directory.   You can double-click on files and
# directories.  The script should be used interactively, so to run:
#   $ tksh
#   $ . scripts/watchdir

function winsetup
{
    pack $(frame .f)
    frame .f.dirname -relief raised -bd 1
    pack .f.dirname -side top -fill x
    pack $(frame .f.ls) $(frame .f.dirs) -side left
    label .f.dirname.label -text "Current directory: "
    label .f.dirname.pwd -textvariable PWD
    pack .f.dirname.label .f.dirname.pwd -side left

    scrollbar .f.ls.scroll -command ".f.ls.list yview"
    listbox .f.ls.list -yscroll ".f.ls.scroll set" -width 20 -setgrid 1
    pack $(label .f.ls.label -text "Directory Contents") -side top
    pack .f.ls.list .f.ls.scroll -side left -fill y -expand 1

    scrollbar .f.dirs.scroll -command ".f.dirs.list yview"
    listbox .f.dirs.list -yscroll ".f.dirs.scroll set" -width 20 -setgrid 1
    pack $(label .f.dirs.label -text "Visited Directories") -side top
    pack .f.dirs.list .f.dirs.scroll -side left -fill y -expand 1
    bind .f.dirs.list "<Double-1>" 'cd $(selection get)'
    bind .f.ls.list "<Double-1>" 'tkfileselect $(selection get)'
}

function tkfileselect
{
    [[ -d "$1" ]] && tkcd "$1"
    [[ -f "$1" ]] && ${EDITOR-${VISUAL-emacs}} "$1"
}

function tkcd
{
    cd $1 > /dev/null || return
    .f.ls.list delete 0 end
    set -o markdirs
    .f.ls.list insert end .. *
    [[ ${VisitedDir["$PWD"]} == "" ]] && .f.dirs.list insert end "$PWD"
    VisitedDir["$PWD"]=1
}

typeset -A VisitedDir
winsetup > /dev/null
alias cd=tkcd
tkcd .

Contribute — propose a file extension

Tell us where to find evidence about Tksh (mapped to pl/tksh). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Tksh/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← TK Solver TL →