mirror of
https://github.com/jorgebucaran/fisher
synced 2024-07-02 23:11:48 +02:00
Use sed with an intermediary file
This commit is contained in:
parent
696e5ee12d
commit
227c5f821f
|
@ -1492,7 +1492,9 @@ function __fisher_key_bindings_remove -a plugin_name
|
||||||
|
|
||||||
fish_indent < "$user_key_bindings" | command sed -n "/### $plugin_name ###/,/### $plugin_name ###/{s/^ *bind /bind -e /p;};" | builtin source ^ /dev/null
|
fish_indent < "$user_key_bindings" | command sed -n "/### $plugin_name ###/,/### $plugin_name ###/{s/^ *bind /bind -e /p;};" | builtin source ^ /dev/null
|
||||||
|
|
||||||
command sed --follow-symlinks -i "/### $plugin_name ###/,/### $plugin_name ###/d" "$user_key_bindings"
|
command sed "/### $plugin_name ###/,/### $plugin_name ###/d" < "$user_key_bindings" > "$user_key_bindings.$tmp"
|
||||||
|
command cat "$user_key_bindings.$tmp" > "$user_key_bindings"
|
||||||
|
command rm "$user_key_bindings.$tmp"
|
||||||
|
|
||||||
if command awk '
|
if command awk '
|
||||||
/^$/ { next }
|
/^$/ { next }
|
||||||
|
|
Loading…
Reference in a new issue