google / google/python-fire

feature request: allow passing unparsed parameters

オープン
#118 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
28.2k
フォーク
1.5k
PR マージ指標
30日以内にマージされた PR はありません

説明

a common idiom in cli is to have a flag (usually --, but this is taken here) that all text afterwards is passed as is (mostly for passing to other commands)

it could be useful to have a similar feature in fire

for example:

> example.py foo --- this is passed as is - --

example.py:
```
import fire

def hello(name, __unparsed__):
print(name)
print(__unparsed__)

if __name__ == '__main__':
fire.Fire(hello)

```
will yield:
> foo
> this is passed as is - --

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。