mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-09 09:36:53 +02:00
14 lines
333 B
Fish
14 lines
333 B
Fish
|
function __fisher_file_remove -a plugin file
|
||
|
if __fisher_file_contains $plugin < $file
|
||
|
set pattern (printf "%s\n" $plugin | __fisher_string_escape)
|
||
|
|
||
|
if test ! -z "$pattern"
|
||
|
set pattern "/^$pattern\$/d"
|
||
|
end
|
||
|
|
||
|
sed -E "$pattern" < $file > $file.tmp
|
||
|
|
||
|
mv $file.tmp $file
|
||
|
end
|
||
|
end
|