mirror of
https://github.com/jorgebucaran/fisher
synced 2024-11-01 21:40:18 +00:00
a11bbee41d
By using `command` we ensure that we always end up calling the external binary and don't get caught by user aliasses, functions or other magic. Closes #79
14 lines
341 B
Fish
14 lines
341 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
|
|
|
|
command mv $file.tmp $file
|
|
end
|
|
end
|