use gnu sed in mac

This commit is contained in:
mTvare 2021-04-24 18:21:13 +05:30 committed by GitHub
parent 7dd473df13
commit aafea2b6f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,7 +53,12 @@ cp -r init.lua ~/.config/nvim && cp -r lua ~/.config/nvim
read -p "which shell do you use?: " shellname read -p "which shell do you use?: " shellname
echo "$shellname" echo "$shellname"
sed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings/lua.lua if [ "$(get_platform)" = "Mac" ]; then
gsed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings/lua.lua
else
sed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings/lua.lua
fi
echo "shell changed to $shellname on nvim successfully!" echo "shell changed to $shellname on nvim successfully!"
#for f in `find -E . -regex ".*\.vim$|.*\.lua$"`; do #for f in `find -E . -regex ".*\.vim$|.*\.lua$"`; do