How to use "wishing" in a sentence

Sentences

Finally, as evening fell, he sat on the ground, exhausted, and gazed across the fields at the distant mountains, wishing that he was back in prison

Not wishing to give evidence against Thenardier in court, Marius made immediate arrangements to leave his room

You won't do that," Elliot said, wishing that he felt as confident as he sounded

For as long as he could remember, he had been fascinated with death, with the mechanics and the meaning of it, and he had longed to know what it was like on the other side - without, of course, wishing to commit himself to a one-way journey there

Beside him ran a little boy He passed me, wishing me good-night