mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-15 04:05:48 -07:00
Export $FZF_KEY environment variable to child processes
It's the name of the last key pressed. Related #3412
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user