【问题标题】:Can I pass named parameters to a fish script?我可以将命名参数传递给鱼脚本吗?
【发布时间】:2014-08-12 11:42:01
【问题描述】:

我了解了using $argv 来访问传递给鱼脚本(或函数)的参数值。但是,这种方法需要位置参数。是否可以按任意顺序传递命名参数,并根据它们的名称提取它们?

例如,以下两个调用是等价的:

favourite_shell best=fish ideological_war=start

favourite_shell ideological_war=start best=fish

【问题讨论】:

    标签: named-parameters fish


    【解决方案1】:

    还没有!不过,https://github.com/fish-shell/fish-shell/issues/478 中有一些讨论。

    【讨论】:

      猜你喜欢
      • 2013-06-11
      • 1970-01-01
      • 2012-09-07
      • 2018-07-29
      • 1970-01-01
      • 1970-01-01
      • 2013-01-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多