shell: refactor default shell command handling
shell: refactor default shell command handling

before, we actually duplicated code for handling of shell commands
supplied to shell_init and those hardcoded by MODULE_SHELL_COMMANDS.

This patch refactors shell.c find_handler and print_help so there's
no duplicated code.

ximus/RIOT,kYc0o/RIOT,jasonatran/RIOT,immesys/RiSyn,cladmi/RIOT,nsol-nmsu/RIOT,ros2/ros2_embedded_riot,authmillenon/RIOT,EmuxEvans/RIOT,luciotorre/RIOT,rousselk/RIOT,ThanhVic/RIOT,LudwigKnuepfer/RIOT,lebrush/RIOT,JensErdmann/RIOT,kerneltask/RIOT,zhuoshuguo/RIOT,authmillenon/RIOT,chris-wood/RIOT,chris-wood/RIOT,changbiao/RIOT,kYc0o/RIOT,daniel-k/RIOT,binarylemon/RIOT,spium/IoT-RIOT,luciotorre/RIOT,adrianghc/RIOT,adjih/RIOT,ximus/RIOT,msolters/RIOT,benoit-canet/RIOT,OlegHahm/RIOT,alignan/RIOT,luciotorre/RIOT,kaleb-himes/RIOT,malosek/RIOT,herrfz/RIOT-old,kaleb-himes/RIOT,kbumsik/RIOT,plushvoxel/RIOT,yogo1212/RIOT,Josar/RIOT,DipSwitch/RIOT,dkm/RIOT,jremmert-phytec-iot/RIOT,avmelnikoff/RIOT,Lotterleben/RIOT,LudwigOrtmann/RIOT,RIOT-OS/RIOT,latsku/RIOT,rakendrathapa/RIOT,OTAkeys/RIOT,spium/IoT-RIOT,FrancescoErmini/RIOT,tfar/RIOT,zhuoshuguo/RIOT,LudwigOrtmann/RIOT,ximus/RIOT,altairpearl/RIOT,dkm/RIOT,Josar/RIOT,rfswarm/RIOT,neiljay/RIOT,nsol-nmsu/RIOT,syin2/RIOT,wentaoshang/RIOT,biboc/RIOT,RubikonAlpha/RIOT,jhollister/RIOT,sumanpanchal/RIOT,ant9000/RIOT,thomaseichinger/RIOT,centurysys/RIOT,Yonezawa-T2/RIOT,ros2/ros2_embedded_riot,gautric/RIOT,abp719/RIOT,neiljay/RIOT,sgso/RIOT,patkan/RIOT,koenning/RIOT,A-Paul/RIOT,watr-li/RIOT,marcosalm/RIOT,basilfx/RIOT,Yonezawa-T2/RIOT,OTAkeys/RIOT,shady33/RIOT,TobiasFredersdorf/RIOT,rfuentess/RIOT,fnack/RIOT,watr-li/RIOT,BytesGalore/PetersRIOT,kb2ma/RIOT,zhuoshuguo/RIOT,FrancescoErmini/RIOT,khhhh/RIOT,OTAkeys/RIOT,aeneby/RIOT,mtausig/RIOT,aeneby/RIOT,gautric/RIOT,TobiasFredersdorf/RIOT,BytesGalore/PetersRIOT,ntrtrung/RIOT,automote/RIOT,x3ro/RIOT,kaleb-himes/RIOT,jferreir/RIOT,jhollister/RIOT,automote/RIOT,ntrtrung/RIOT,altairpearl/RIOT,d00616/RIOT,dhruvvyas90/RIOT,Yonezawa-T2/RIOT,Darredevil/RIOT,tfar/RIOT,AnonMall/RIOT,khhhh/RIOT,msolters/RIOT,changbiao/RIOT,malosek/RIOT,kaspar030/RIOT,latsku/RIOT,benoit-canet/RIOT,changbiao/RIOT,FrancescoErmini/RIOT,marcosalm/RIOT,chris-wood/RIOT,hamilton-mote/RIOT-OS,abp719/RIOT,jremmert-phytec-iot/RIOT,locicontrols/RIOT,aeneby/RIOT,rajma996/RIOT,roberthartung/RIOT,lebrush/RIOT,roberthartung/RIOT,biboc/RIOT,altairpearl/RIOT,arvindpdmn/RIOT,Ell-i/RIOT,l3nko/RIOT,wentaoshang/RIOT,rfuentess/RIOT,ThanhVic/RIOT,openkosmosorg/RIOT,gebart/RIOT,immesys/RiSyn,daniel-k/RIOT,RIOT-OS/RIOT,AnonMall/RIOT,Hyungsin/RIOT-OS,d00616/RIOT,1blankz7/RIOT,phiros/RIOT,malosek/RIOT,yogo1212/RIOT,rfuentess/RIOT,authmillenon/RIOT,kaspar030/RIOT,mfrey/RIOT,jremmert-phytec-iot/RIOT,MarkXYang/RIOT,lebrush/RIOT,EmuxEvans/RIOT,smlng/RIOT,thiagohd/RIOT,spium/IoT-RIOT,ntrtrung/RIOT,haoyangyu/RIOT,dhruvvyas90/RIOT,1blankz7/RIOT,watr-li/RIOT,BytesGalore/PetersRIOT,yogo1212/RIOT,automote/RIOT,herrfz/RIOT,openkosmosorg/RIOT,jferreir/RIOT,latsku/RIOT,l3nko/RIOT,l3nko/RIOT,wentaoshang/RIOT,jremmert-phytec-iot/RIOT,d00616/RIOT,haoyangyu/RIOT,Osblouf/RIOT,kerneltask/RIOT,kbumsik/RIOT,kushalsingh007/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,neumodisch/RIOT,kb2ma/RIOT,herrfz/RIOT,alex1818/RIOT,daniel-k/RIOT,Ell-i/RIOT,sgso/RIOT,herrfz/RIOT,lazytech-org/RIOT,BytesGalore/PetersRIOT,syin2/RIOT,d00616/RIOT,bartfaizoltan/RIOT,chris-wood/RIOT,RubikonAlpha/RIOT,jasonatran/RIOT,LudwigKnuepfer/RIOT,Osblouf/RIOT,OlegHahm/RIOT,beurdouche/RIOT,patkan/RIOT,shady33/RIOT,patkan/RIOT,thiagohd/RIOT,plushvoxel/RIOT,BytesGalore/RIOT,jfischer-phytec-iot/RIOT,miri64/RIOT,kbumsik/RIOT,centurysys/RIOT,gbarnett/RIOT,avmelnikoff/RIOT,alex1818/RIOT,dailab/RIOT,altairpearl/RIOT,l3nko/RIOT,stevenj/RIOT,adrianghc/RIOT,josephnoir/RIOT,altairpearl/RIOT,jferreir/RIOT,brettswann/RIOT,automote/RIOT,miri64/RIOT,msolters/RIOT,RubikonAlpha/RIOT,basilfx/RIOT,neumodisch/RIOT,rousselk/RIOT,tdautc19841202/RIOT,haoyangyu/RIOT,rfuentess/RIOT,emmanuelsearch/RIOT,LudwigOrtmann/RIOT,automote/RIOT,Lotterleben/RIOT,MonsterCode8000/RIOT,phiros/RIOT,TobiasFredersdorf/RIOT,jbeyerstedt/RIOT-OTA-update,rakendrathapa/RIOT,RubikonAlpha/RIOT,Lexandro92/RIOT-CoAP,rousselk/RIOT,herrfz/RIOT-old,ks156/RIOT,kushalsingh007/RIOT,sgso/RIOT,rfswarm2/RIOT,patkan/RIOT,MonsterCode8000/RIOT,ThanhVic/RIOT,watr-li/RIOT,marcosalm/RIOT,rakendrathapa/RIOT,zhuoshuguo/RIOT,jhollister/RIOT,l3nko/RIOT,syin2/RIOT,ks156/RIOT,kb2ma/RIOT,backenklee/RIOT,plushvoxel/RIOT,tfar/RIOT,nsol-nmsu/RIOT,mfrey/RIOT,mfrey/RIOT,binarylemon/RIOT,jbeyerstedt/RIOT-OTA-update,thomaseichinger/RIOT,jhollister/RIOT,rajma996/RIOT,syin2/RIOT,MohmadAyman/RIOT,ros2/ros2_embedded_riot,beurdouche/RIOT,jferreir/RIOT,abkam07/RIOT,hamilton-mote/RIOT-OS,dkm/RIOT,immesys/RiSyn,BytesGalore/PetersRIOT,abp719/RIOT,kYc0o/RIOT,DipSwitch/RIOT,mziegert/RIOT,immesys/RiSyn,katezilla/RIOT,kushalsingh007/RIOT,rousselk/RIOT,PSHIVANI/Riot-Code,alignan/RIOT,miri64/RIOT,TobiasFredersdorf/RIOT,asanka-code/RIOT,OTAkeys/RIOT,Hyungsin/RIOT-OS,nsol-nmsu/RIOT,rajma996/RIOT,RIOT-OS/RIOT,asanka-code/RIOT,gebart/RIOT,jhollister/RIOT,kaleb-himes/RIOT,rajma996/RIOT,LudwigKnuepfer/RIOT,jasonatran/RIOT,cladmi/RIOT,centurysys/RIOT,JensErdmann/RIOT,beurdouche/RIOT,Hyungsin/RIOT-OS,tfar/RIOT,abp719/RIOT,BytesGalore/PetersRIOT,plushvoxel/RIOT,MonsterCode8000/RIOT,benoit-canet/RIOT,adjih/RIOT,Osblouf/RIOT,JensErdmann/RIOT,daniel-k/RIOT,FrancescoErmini/RIOT,koenning/RIOT,AnonMall/RIOT,lebrush/RIOT,avmelnikoff/RIOT,RBartz/RIOT,jbeyerstedt/RIOT-OTA-update,kushalsingh007/RIOT,wentaoshang/RIOT,Yonezawa-T2/RIOT,toonst/RIOT,zhuoshuguo/RIOT,kaspar030/RIOT,smlng/RIOT,ThanhVic/RIOT,msolters/RIOT,RBartz/RIOT,daniel-k/RIOT,thiagohd/RIOT,neiljay/RIOT,abkam07/RIOT,rousselk/RIOT,binarylemon/RIOT,thiagohd/RIOT,kaleb-himes/RIOT,EmuxEvans/RIOT,avmelnikoff/RIOT,Lotterleben/RIOT,malosek/RIOT,OlegHahm/RIOT,lazytech-org/RIOT,bartfaizoltan/RIOT,rfswarm/RIOT,gautric/RIOT,kbumsik/RIOT,benoit-canet/RIOT,koenning/RIOT,x3ro/RIOT,arvindpdmn/RIOT,Darredevil/RIOT,Osblouf/RIOT,josephnoir/RIOT,yogo1212/RIOT,x3ro/RIOT,1blankz7/RIOT,Lexandro92/RIOT-CoAP,jasonatran/RIOT,rakendrathapa/RIOT,alex1818/RIOT,asanka-code/RIOT,neiljay/RIOT,RubikonAlpha/RIOT,brettswann/RIOT,herrfz/RIOT-old,DipSwitch/RIOT,rfuentess/RIOT,abkam07/RIOT,attdona/RIOT,lazytech-org/RIOT,sumanpanchal/RIOT,BytesGalore/RIOT,stevenj/RIOT,stevenj/RIOT,katezilla/RIOT,spium/IoT-RIOT,koenning/RIOT,gautric/RIOT,openkosmosorg/RIOT,ximus/RIOT,BytesGalore/PetersRIOT,daniel-k/RIOT,sumanpanchal/RIOT,basilfx/RIOT,MonsterCode8000/RIOT,abp719/RIOT,sgso/RIOT,aeneby/RIOT,fnack/RIOT,lebrush/RIOT,beurdouche/RIOT,jferreir/RIOT,miri64/RIOT,EmuxEvans/RIOT,yogo1212/RIOT,locicontrols/RIOT,beurdouche/RIOT,A-Paul/RIOT,ant9000/RIOT,dkm/RIOT,adjih/RIOT,malosek/RIOT,AnonMall/RIOT,asanka-code/RIOT,jasonatran/RIOT,sgso/RIOT,AnonMall/RIOT,basilfx/RIOT,yogo1212/RIOT,stevenj/RIOT,1blankz7/RIOT,haoyangyu/RIOT,MohmadAyman/RIOT,khhhh/RIOT,hamilton-mote/RIOT-OS,ThanhVic/RIOT,rfswarm/RIOT,hamilton-mote/RIOT-OS,robixnai/RIOT,watr-li/RIOT,LudwigOrtmann/RIOT,koenning/RIOT,RBartz/RIOT,jbeyerstedt/RIOT-OTA-update,robixnai/RIOT,alex1818/RIOT,MohmadAyman/RIOT,authmillenon/RIOT,centurysys/RIOT,1blankz7/RIOT,mfrey/RIOT,1blankz7/RIOT,ros2/ros2_embedded_riot,gbarnett/RIOT,gebart/RIOT,ximus/RIOT,TobiasFredersdorf/RIOT,RBartz/RIOT,thomaseichinger/RIOT,kbumsik/RIOT,Darredevil/RIOT,haoyangyu/RIOT,msolters/RIOT,khhhh/RIOT,Lotterleben/RIOT,mtausig/RIOT,ros2/ros2_embedded_riot,kb2ma/RIOT,rfswarm2/RIOT,kaspar030/RIOT,mziegert/RIOT,neumodisch/RIOT,sumanpanchal/RIOT,roberthartung/RIOT,cladmi/RIOT,abkam07/RIOT,cladmi/RIOT,backenklee/RIOT,haoyangyu/RIOT,openkosmosorg/RIOT,dailab/RIOT,dailab/RIOT,khhhh/RIOT,mziegert/RIOT,patkan/RIOT,OlegHahm/RIOT,chris-wood/RIOT,fnack/RIOT,smlng/RIOT,adrianghc/RIOT,katezilla/RIOT,attdona/RIOT,thiagohd/RIOT,binarylemon/RIOT,BytesGalore/RIOT,sumanpanchal/RIOT,EmuxEvans/RIOT,herrfz/RIOT,d00616/RIOT,attdona/RIOT,adjih/RIOT,locicontrols/RIOT,stevenj/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,BytesGalore/RIOT,emmanuelsearch/RIOT,locicontrols/RIOT,mziegert/RIOT,kYc0o/RIOT,EmuxEvans/RIOT,dailab/RIOT,adrianghc/RIOT,watr-li/RIOT,immesys/RiSyn,shady33/RIOT,mtausig/RIOT,thiagohd/RIOT,locicontrols/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,tdautc19841202/RIOT,ntrtrung/RIOT,malosek/RIOT,hamilton-mote/RIOT-OS,luciotorre/RIOT,binarylemon/RIOT,asanka-code/RIOT,gautric/RIOT,rakendrathapa/RIOT,PSHIVANI/Riot-Code,latsku/RIOT,ThanhVic/RIOT,ks156/RIOT,lebrush/RIOT,msolters/RIOT,attdona/RIOT,Josar/RIOT,tdautc19841202/RIOT,Lotterleben/RIOT,shady33/RIOT,robixnai/RIOT,lazytech-org/RIOT,brettswann/RIOT,arvindpdmn/RIOT,emmanuelsearch/RIOT,kerneltask/RIOT,FrancescoErmini/RIOT,bartfaizoltan/RIOT,phiros/RIOT,authmillenon/RIOT,authmillenon/RIOT,A-Paul/RIOT,benoit-canet/RIOT,adjih/RIOT,rajma996/RIOT,abkam07/RIOT,ant9000/RIOT,Darredevil/RIOT,alex1818/RIOT,josephnoir/RIOT,centurysys/RIOT,alex1818/RIOT,openkosmosorg/RIOT,FrancescoErmini/RIOT,kerneltask/RIOT,A-Paul/RIOT,immesys/RiSyn,dailab/RIOT,BytesGalore/RIOT,arvindpdmn/RIOT,plushvoxel/RIOT,MarkXYang/RIOT,changbiao/RIOT,gbarnett/RIOT,phiros/RIOT,nsol-nmsu/RIOT,MarkXYang/RIOT,miri64/RIOT,Darredevil/RIOT,MarkXYang/RIOT,gbarnett/RIOT,DipSwitch/RIOT,l3nko/RIOT,Osblouf/RIOT,brettswann/RIOT,lazytech-org/RIOT,RBartz/RIOT,kYc0o/RIOT,chris-wood/RIOT,RIOT-OS/RIOT,fnack/RIOT,kaspar030/RIOT,avmelnikoff/RIOT,locicontrols/RIOT,PSHIVANI/Riot-Code,PSHIVANI/Riot-Code,mziegert/RIOT,OlegHahm/RIOT,luciotorre/RIOT,marcosalm/RIOT,ntrtrung/RIOT,toonst/RIOT,Darredevil/RIOT,x3ro/RIOT,khhhh/RIOT,marcosalm/RIOT,attdona/RIOT,toonst/RIOT,RubikonAlpha/RIOT,openkosmosorg/RIOT,brettswann/RIOT,jfischer-phytec-iot/RIOT,robixnai/RIOT,emmanuelsearch/RIOT,emmanuelsearch/RIOT,AnonMall/RIOT,backenklee/RIOT,katezilla/RIOT,MarkXYang/RIOT,jferreir/RIOT,alignan/RIOT,josephnoir/RIOT,JensErdmann/RIOT,adrianghc/RIOT,Lotterleben/RIOT,Lexandro92/RIOT-CoAP,cladmi/RIOT,bartfaizoltan/RIOT,herrfz/RIOT-old,phiros/RIOT,jfischer-phytec-iot/RIOT,abkam07/RIOT,koenning/RIOT,tdautc19841202/RIOT,neiljay/RIOT,arvindpdmn/RIOT,smlng/RIOT,rfswarm/RIOT,ant9000/RIOT,rousselk/RIOT,attdona/RIOT,gbarnett/RIOT,biboc/RIOT,fnack/RIOT,luciotorre/RIOT,Hyungsin/RIOT-OS,rfswarm2/RIOT,bartfaizoltan/RIOT,locicontrols/RIOT,latsku/RIOT,Lexandro92/RIOT-CoAP,LudwigKnuepfer/RIOT,rakendrathapa/RIOT,tdautc19841202/RIOT,thomaseichinger/RIOT,neumodisch/RIOT,jfischer-phytec-iot/RIOT,shady33/RIOT,sgso/RIOT,mtausig/RIOT,rfswarm2/RIOT,kerneltask/RIOT,syin2/RIOT,JensErdmann/RIOT,katezilla/RIOT,kushalsingh007/RIOT,tfar/RIOT,gbarnett/RIOT,toonst/RIOT,Osblouf/RIOT,Hyungsin/RIOT-OS,A-Paul/RIOT,jremmert-phytec-iot/RIOT,mtausig/RIOT,biboc/RIOT,rfswarm/RIOT,LudwigOrtmann/RIOT,dhruvvyas90/RIOT,patkan/RIOT,zhuoshuguo/RIOT,Ell-i/RIOT,changbiao/RIOT,gebart/RIOT,Yonezawa-T2/RIOT,MonsterCode8000/RIOT,spium/IoT-RIOT,rfswarm2/RIOT,d00616/RIOT,asanka-code/RIOT,sumanpanchal/RIOT,wentaoshang/RIOT,mziegert/RIOT,mfrey/RIOT,Josar/RIOT,MonsterCode8000/RIOT,dkm/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,PSHIVANI/Riot-Code,roberthartung/RIOT,robixnai/RIOT,Lexandro92/RIOT-CoAP,kushalsingh007/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,dhruvvyas90/RIOT,MohmadAyman/RIOT,rfswarm2/RIOT,OTAkeys/RIOT,automote/RIOT,LudwigOrtmann/RIOT,spium/IoT-RIOT,PSHIVANI/Riot-Code,ros2/ros2_embedded_riot,Josar/RIOT,JensErdmann/RIOT,Ell-i/RIOT,rfswarm/RIOT,MohmadAyman/RIOT,dhruvvyas90/RIOT,herrfz/RIOT,ks156/RIOT,LudwigKnuepfer/RIOT,binarylemon/RIOT,ntrtrung/RIOT,herrfz/RIOT,herrfz/RIOT-old,thomaseichinger/RIOT,toonst/RIOT,Ell-i/RIOT,phiros/RIOT,ximus/RIOT,neumodisch/RIOT,emmanuelsearch/RIOT,rajma996/RIOT,x3ro/RIOT,Lotterleben/RIOT,kb2ma/RIOT,marcosalm/RIOT,alignan/RIOT,latsku/RIOT,backenklee/RIOT,robixnai/RIOT,ros2/ros2_embedded_riot,Yonezawa-T2/RIOT,fnack/RIOT,aeneby/RIOT,neumodisch/RIOT,roberthartung/RIOT,MarkXYang/RIOT,bartfaizoltan/RIOT,centurysys/RIOT,benoit-canet/RIOT,jbeyerstedt/RIOT-OTA-update,shady33/RIOT,Lexandro92/RIOT-CoAP,MohmadAyman/RIOT,DipSwitch/RIOT,abp719/RIOT,ant9000/RIOT,alignan/RIOT,brettswann/RIOT,arvindpdmn/RIOT,DipSwitch/RIOT,RBartz/RIOT,gebart/RIOT,jremmert-phytec-iot/RIOT,ks156/RIOT,backenklee/RIOT,altairpearl/RIOT,smlng/RIOT,jfischer-phytec-iot/RIOT,wentaoshang/RIOT,dhruvvyas90/RIOT,stevenj/RIOT,RIOT-OS/RIOT,josephnoir/RIOT,changbiao/RIOT,tdautc19841202/RIOT,biboc/RIOT,basilfx/RIOT,jhollister/RIOT