nervosnetwork / ckb-cli

CKB command line interface
MIT License
55 stars 35 forks source link

interactive mode ignored cli flag #456

Open fgfm999 opened 2 years ago

fgfm999 commented 2 years ago

when using the interactive mode , the FLAG options are ignored eg:

root@6fb00f2fd2f2:~# ckb-cli --no-sync

  _   _   ______   _____   __      __   ____     _____
 | \ | | |  ____| |  __ \  \ \    / /  / __ \   / ____|
 |  \| | | |__    | |__) |  \ \  / /  | |  | | | (___
 | . ` | |  __|   |  _  /    \ \/ /   | |  | |  \___ \
 | |\  | | |____  | | \ \     \  /    | |__| |  ____) |
 |_| \_| |______| |_|  \_\     \/      \____/  |_____/

[  ckb-cli version ]: 0.100.0 (3d23e8b 2021-09-15)
[              url ]: http://127.0.0.1:8114 (network: Dev)
[              pwd ]: /root
[            color ]: true
[            debug ]: true
[          no-sync ]: false
[    output format ]: yaml
[ completion style ]: List
[       edit style ]: Emacs
[   index db state ]: Waiting for first query

the no-sync option still false. I found I can change this using config --no-sync or edit the config file . IMHO, the command line flag should override the config file

TheWaWaR commented 2 years ago

I think the config in interactive mode should reflected the config file. Interactive mode should not passing any arguments.