Rashid grabbed three of the remaining four wickets as Afghanistan took 17.2 overs on the fifth day to bowl out Bangladesh for 173.
The visitors -- playing only their third Test ever -- reduced Bangladesh to 136-6 before rain forced an early stump on the fourth day.
Debutant Zadran hit highest 87 off 208 balls for Afghanistan in the second innings while former skipper Afghan made 50 off 108 balls.
The major reason behind Nabi's decision to step away wasn’t stated but the decision might help him prolong his white-ball career
Rashid hit 51 off 61 balls to take Afghanistan to 342 in their first innings and then claimed 4-47 to leave Bangladesh struggling at 194 for eight.
Shah made 102 and put on a crucial 120-run fourth-wicket stand with Asghar Afghan, batting on 88, to counter the Bangladesh spin attack.
He becomes the youngest ever Test captain at 20 years and 350 days, overtaking Zimbabwe's Tatenda Taibu, who was eight days older.
The solitary Test match against Afghanistan will be Domingo's first assignment as the Bangladesh head coach.
The other notable omissions from the Bangladesh line-up include veteran opening batsman Tamim Iqbal and pace bowler Khalid Ahmed.
Fawad Alam in line for a Test comeback?
Sindh claim victory in last-over thriller after Babar Azam ton
Imran Nazir excited for Qalandars High-Performance Center
Shehzad ton overpowers Asif's cameo as Central Punjab edge Northern
Sarfaraz, Rizwan urge fans to throng the Iqbal Stadium
Virat Kohli floors South Africa with career-best double century
Tanvir Ahmed blasts on PCB for shutting departmental cricket
Kohli within touching distance of replacing Smith as No. 1 Test batsman
Zimbabwe readmitted as ICC member after three-month suspension
Babar adds one more record in his inventory