I accidentally forgot to remove my bike pump holder when I sold my first folding bike. And since then, I had to use zip ties to secure my pump. It took too much time installing and removing and wasn’t very practical. One day I saw my flashlight holder and noticed that it can hold different sized flashlights and thought that maybe it can hold my pump too. Yes it can. Here it is without the pump. I placed it it the handlebar stem for quick access.
And here it is with the pump attached. It also gives me peace of mind that I can see the pump is still there.