diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd.sh | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmds= +cmds=' ' register_cmd() { @@ -96,7 +96,8 @@ is_cmd() { local cmd="${1}" - [ "x$(printf '%s\n' ${cmds} | grep "^${cmd}$")" = "x${cmd}" ] + case "${cmds}" in *" ${cmd} "*) return 0;; esac + return 1 } run_cmd() |