测试是否未设置变量名

问题描述

是否有一种方法可以测试何时不使用变量名?

我目前正在这样做:

#!/usr/bin/fish

set -l options (fish_opt -s n)
argparse $options -- $argv

if set --query _flag_n
else
    # Run some code only if -n is not set.
end

$_flag_n可能为空,因此我无法检查字符串长度。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...