#3262·shellcheck

local is undefined in ksh93, but not flagged.

Author: slycordinatorCreated Jul 25, 2025Updated Sep 26, 2026

For bugs with existing features

In the Wiki for SC3043, it states that local is supported in ksh, but this is not true of ksh93.

Here's a snippet or screenshot that shows the problem:

bash
#!/bin/ksh93
my_function() {
    local local_var="$1"
    echo "${local_var}"
}
my_function some_string

Here's what shellcheck currently says:

No issues detected!

Here's what I wanted or expected to see:

local is undefined in ksh93

Output from the shell

ksh93: my_function[2]: local: not found