There is an article about the Khojak Rope Inclines at the Funimag website, which covers funicular railways.
The Khojak tunnel is (now) in Pakistan, on the railway from Quetta to Chaman on the Afghan border.
The defense and the supply of Chaman could not wait for these three years of digging Khojak tunnel. The Indian government decided to build a temporary line of communication, quick and inexpensive to cross the mountains until the end of the work in the Khojak tunnel (1889-1891).
The temporary railway line was built in 1888 and crossed the summit chain Khwaja Amran mountains with the help of four inclined cable railways which allowed to move locomotives and carriages from one side to the other side of the mountain.