mirror of https://github.com/jorgebucaran/fisher
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
523 B
Fish
29 lines
523 B
Fish
function __fisher_key_bindings_update -a name
|
|
fish_indent | awk \
|
|
-v name="$name" \
|
|
-v pattern="^function (fish_user_)?key_bindings\$" '
|
|
|
|
function banner() {
|
|
print "##" name "##"
|
|
}
|
|
|
|
BEGIN { banner() } END { banner() }
|
|
|
|
$0 ~ pattern {
|
|
end = 1
|
|
next
|
|
}
|
|
|
|
/^end$/ && end {
|
|
end = 0
|
|
next
|
|
}
|
|
|
|
!/^ *(#.*)*$/ {
|
|
gsub("#.*", "")
|
|
|
|
printf("%s\n", $0)
|
|
}
|
|
'
|
|
end
|