热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Settingorfunctiontoprohibitprocesstermination

Iwouldliketouseclapseasysyntaxfordifferentstagesinmyprogramthenjustcomm

I would like to use clap's easy syntax for different stages in my program then just command line argument parsing. E.g. to parse remote commands with arguments read from sockets. I can already utilize clap using get_matches_from. But even get_matches_from_safe terminates my program when --help or --version gets passed to. I would like to have either an even safer _safe method or an app-setting, that completely blocks any terminate inside the clap crate and some kind of indication, if parsing did succeed or it should have terminated.

Would that be possible?

Best regards,
Drakulix

该提问来源于开源项目:clap-rs/clap

Thanks. This is exactly the behavior I expected at first, when using the safe-function. Hopefully this will be also more intuitive and useful to other users as well. Looking forward to the actual merge!





   



推荐阅读
author-avatar
手机用户2502859545
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有