Handle complex $EDITOR values.
This commit is contained in:
parent
dfcff44e3e
commit
e3c6d9bf00
@ -131,10 +131,11 @@ def exec_editor *args
|
|||||||
'/usr/bin/vim' # Default to vim
|
'/usr/bin/vim' # Default to vim
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# we split the editor because especially on mac "mate -w" is common
|
|
||||||
# but we still want to use the comma-delimited version of exec because then
|
# Invoke bash to evaluate env vars in $EDITOR
|
||||||
# we don't have to escape args, and escaping 100% is tricky
|
# This also gets us proper argument quoting.
|
||||||
exec *(editor.split + args) unless args.empty?
|
# See: https://github.com/mxcl/homebrew/issues/5123
|
||||||
|
system "bash", "-c", editor + ' "$@"', "--", *args
|
||||||
end
|
end
|
||||||
|
|
||||||
# GZips the given paths, and returns the gzipped paths
|
# GZips the given paths, and returns the gzipped paths
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user