[ADD][SHELL] Vim as an Info reader function

The node needs to have the spaces in its title escaped to work correctly
with the Info command.
This commit is contained in:
Bruno BELANYI 2019-10-27 18:35:50 +01:00
parent f08e81154f
commit bccda57c46

View file

@ -59,3 +59,12 @@ function mcd() {
function meteo() {
curl "http://wttr.in/$1" # Bonus: try to see the weather on 'moon'
}
# Use Vim as an Info reader with a plug-in
function vinfo() {
page="$1"
shift
node="${*// /\ }"
echo vim "+Info $page $node" "+only"
vim "+Info $page $node" "+only"
}