Export $FZF_KEY environment variable to child processes

It's the name of the last key pressed.

Related #3412
This commit is contained in:
Junegunn Choi committed 2024-04-13 14:00:16 +09:00
1 parent a4745626dd
commit fd1ba46f77
8 files changed
+315 -121

No files matched your search

+12
View File
@@ -176,3 +176,15 @@ func RepeatToFill(str string, length int, limit int) string {
}
return output
}
// ToKebabCase converts the given CamelCase string to kebab-case
func ToKebabCase(s string) string {
name := ""
for i, r := range s {
if i > 0 && r >= 'A' && r <= 'Z' {
name += "-"
}
name += string(r)
}
return strings.ToLower(name)
}