summaryrefslogtreecommitdiffstats
path: root/common/complete.c
Commit message (Collapse)AuthorAgeFilesLines
* completion: Fix completion for devices with a dot in the nameSascha Hauer2016-10-071-8/+8
| | | | | | | Devices can have a dot in the name, so do not expect the full device name before the first dot. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* completion: fix device parameter completionSascha Hauer2015-08-071-16/+19
| | | | | | | | | With device parameter completion the '.' separator between the device name and the parameter was not handled correctly. For example with a device named global a completion starting with "g." was completed to "g.obal.". fix this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: fix 'new blank line at EOF' formatting errorAntony Pavlov2015-07-021-1/+0
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* complete: Add devicetree completionSascha Hauer2014-05-191-0/+71
| | | | | | | | The of_* commands take devicetree nodes as parameters. Add a devicetree completion function to ease passing nodes to these commands. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* complete: Fix completion after optionsSascha Hauer2014-05-191-0/+5
| | | | | | | | | | | | | the command specific complete callbacks only work when no option is typed already. For example "devinfo <tab><tab>" correctly completes the devices, but "devinfo -x <tab><tab>" does nothing. That is because the options are passed to the input string of the completion handlers. Skip the option string by finding the last space in the input string. This is not perfect since "devinfo -f<tab><tab>" still does not work, but it's better than what we have now. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* environment variables: use linux listSascha Hauer2012-10-301-5/+7
| | | | | | | | This switches environment variables to use linux list. This is easier to read. An additional plus is that the environment variables no longer need an initcall, so malloc is the only requirement for them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-171-3/+0
| | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* complete: add missing EXPORT_SYMBOL for {command, device, empty, ↵Jean-Christophe PLAGNIOL-VILLARD2012-07-251-0/+4
| | | | | | | command}_var_complete Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/menu'Sascha Hauer2012-07-021-1/+1
|\
| * complete: fix parameter complete with multiple '.'Sascha Hauer2012-06-301-1/+1
| | | | | | | | | | | | | | When a device parameter has dots in its name, we have to use strchr instead of strrchr, because the devicename ends at the first dot, not at the last one. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | common: fix typo cammand_var_completeSteffen Trumtrar2012-06-301-1/+1
|/ | | | | | | Change function name to command_var_complete in all calls and its declaration. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* complete: fix duplicate env eval listJean-Christophe PLAGNIOL-VILLARD2012-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this can be reproductable by this sequence barebox:/ <TAB> . ? [ addpart bootm cat cd clear cp cpuinfo crc32 delpart devinfo dhcp echo edit erase ethact exit export false getopt go help host loadb loadenv loady login ls md md5sum memcmp memcpy meminfo memset menu mkdir mount mtest mw nfs passwd ping printenv protect pwd readline reset rm rmdir saveenv sedit sh sha1sum sha256sum sleep source test tftp time timeout true umount uncompress unprotect version net.nameserver= net.domainname= cs0.baudrate= cs0.active= cs1.active= cs1.ip= cs1.port= barebox:/ $<TAB> $net.nameserver $net.domainname $cs0.baudrate $cs0.active $cs1.active $cs1.ip $cs1.port $net.nameserver $net.domainname $cs0.baudrate $cs0.active $cs1.active $cs1.ip $cs1.port barebox:/ $ Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* complete: add executable file supportJean-Christophe PLAGNIOL-VILLARD2012-04-301-11/+19
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* complete: add go and sleep supportJean-Christophe PLAGNIOL-VILLARD2012-04-301-0/+5
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* complete: add empty complete supportJean-Christophe PLAGNIOL-VILLARD2012-04-301-0/+5
| | | | | | | | | | for cpuinfo, clear, dhcp, false, login, lsmod, meminfo, passwd, pwd, reginfo, reset, true, usb, version for mach-imx and mach-mxs: dump_clocks for u_serial: mycdev Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* complete: add device name complete support for devinfoJean-Christophe PLAGNIOL-VILLARD2012-04-301-0/+20
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* complete: add generic command complete frameworkJean-Christophe PLAGNIOL-VILLARD2012-04-301-15/+40
| | | | | | introduce generic command specific complete callback Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* complete: add var and device param complete supportJean-Christophe PLAGNIOL-VILLARD2012-04-301-6/+90
| | | | | | with $xx or xx= or if device $xx.yy or xx.yy= Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* auto-completion: add auto-completion for path filesAlexander Aring2011-12-211-2/+68
| | | | | | | Add auto-completion for path files. Signed-off-by: Alexander Aring <a.aring@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove typedef cmd_tbl_t and replace it with struct commandSascha Hauer2010-02-011-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* list: remove duplicated list.hSascha Hauer2009-11-031-1/+1
| | | | | | | | We accidently have two list implementations in the tree: include/list.h and include/linux/list.h. This patch moves the latter (newer one) to include/linux/list.h. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* use newly introduced stringlist functions for tab completionSascha Hauer2008-03-111-48/+15
|
* implement TAB completionSascha Hauer2008-03-011-0/+210