junegunn/fzf · error
bind action not specified: ${keys}
Error message
bind action not specified: ${keys} What it means
Thrown by parseKeymap at the end of --bind parsing. fzf allows multi-key binds ('a,b:accept'), accumulating pending key names until an action appears. If the input ends while keys are still pending (len(keys) > 0), those keys have no action bound and the option is rejected.
Source
Thrown at src/options.go:2057
key = tui.Key(',')
} else if len(keyName) == 1 && keyName[0] == escapedPlus {
key = tui.Key('+')
} else {
keys, _, err := parseKeyChords(keyName, "key name required")
if err != nil {
return err
}
key = firstKey(keys)
}
keymap[key], err = parseActionList(pair[1], origPairStr[len(pair[0])+1:], keymap[key], key.Printable())
if err != nil {
return err
}
}
keys = keys[:0]
}
if len(keys) > 0 {
return errors.New("bind action not specified: " + strings.Join(keys, ", "))
}
return nil
}
func isExecuteAction(str string) actionType {
masked := maskActionContents(":" + str)[1:]
if masked == str {
// Not masked
return actIgnore
}
prefix := actionNameRegexp.FindString(str)
switch prefix {
case "become":
return actBecome
case "reload":
return actReload
case "reload-sync":View on GitHub (pinned to bd4efa277b)
Solutions
- Make every key or key group in the --bind list is followed by ':action'
- Remove dangling trailing fragments like ',a,b' that have no action
- Split complex binds into multiple --bind flags so each is easy to validate
Example fix
# before fzf --bind 'ctrl-a:accept,a,b' # after fzf --bind 'ctrl-a:accept' --bind 'a,b:accept'
Defensive patterns
Strategy: validation
Validate before calling
# bash: every comma-separated bind pair must contain ':action'
binds_ok() {
IFS=',' read -ra p <<< "$1"
for x in "${p[@]}"; do [[ "$x" == *:* ]] || return 1; done
}
binds_ok "$BINDS" || { echo "each --bind entry needs key:action" >&2; exit 1; } Prevention
- One --bind flag per binding keeps strings short and self-checking
- When using multi-key chords, always terminate the group with ':action'
When it happens
Trigger: `--bind 'ctrl-a'` (single key, no colon/action), `--bind 'a,b'` (multi-key chord with no action), or a trailing fragment like `--bind 'ctrl-a:accept,a,b'` where the last chord has no action. Also the leading-comma case: ',ctrl-a:accept' leaves an empty pending key.
Common situations: Splitting a long bind list across shell lines and dropping the ':action' part of the last entry; refactoring bind strings and forgetting to close the final chord; truncated variables.
Related errors
- key name required
- unable to put non-printable character
- unknown action: ${spec}
- multiple keys specified
- ${label} must be non-negative
AI-assisted analysis of junegunn/fzf@bd4efa277b (2026-08-15).
Data as JSON: /api/errors/954abc32cc362eab.
Report an issue: GitHub.