BagsContainers (bags, boxes, chests, etc.) in your inventory are treated differently from boxes and cheststhose on the ground. (which to access them, you need to [l]oot.can access using #loot command). For bags in your inventory, treat them like tools and use them with [a]pply[a]pply. This will then bring up the menu to add, remove, or just view the items within.
use the extended form #loot that works also with number_pad off; add wiki links; clarify that the type of container doesn't matter, just whether it's in your inventory or on the ground; misc. copyedits