Etymology
Today it means: In the manner of a trench or ditch. Full definition →
From trench + -wise.
Etymology from Wiktionary, CC BY-SA 4.0.