[3.7] bpo-35054: Add more index entries for symbols. (GH-10064). (GH-10120)

(cherry picked from commit ddb961d2abe5d5fde76d85b21a77e4e91e0043ad)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst
index 75e7e5b..1f76717 100644
--- a/Doc/library/os.path.rst
+++ b/Doc/library/os.path.rst
@@ -152,6 +152,8 @@
       Accepts a :term:`path-like object`.
 
 
+.. index:: single: ~; home directory expansion
+
 .. function:: expanduser(path)
 
    On Unix and Windows, return the argument with an initial component of ``~`` or
@@ -175,6 +177,9 @@
    .. versionchanged:: 3.6
       Accepts a :term:`path-like object`.
 
+.. index::
+   single: $; environment variables expansion
+   single: %; environment variables expansion (Windows)
 
 .. function:: expandvars(path)