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.
‘Unfortunate that Amir and Wahab are not playing Test cricket anymore’ – Waqar Younis
Malik blitz spurs Guyana to fifth win on the trot
Abid Ali, Sami Aslam headline Quaid-e-Azam Trophy opening round with double tons
Rahkeem Cornwall smacks 75 off 30 balls
Kohli, Chahar complete comfortable win for India
5 talking points from first round of Quaid-e-Azam Trophy
Babar Azam elevated to vice-captain post
Misbah to give leeway to Umar Akmal
Sarfaraz urges Sri Lanka to tour Pakistan
Jofra Archer earns ECB central contracts, Moeen Ali loses Test deal