Command-line Decred Tool With Tab Completion

Discussion in 'Project Ideas' started by root, Apr 12, 2016.

  1. 2017/12/15 - Decred v1.1.2 released! → Release Notes  → Downloads
  1. root

    root Member

    Feb 3, 2016
    381
    76
    Hi all, as I do not work with Decred every day and do not remember all 134 commands and I do not remember properly even those few commands I use often, I had an idea.

    I admit I was spoiled by ipython and its tab completion feature.

    It is a great tool and speed things up a lot.

    The possibilities of such feature for decred are endless: just a wallet, PoS tool, report tool, mighty all in one solution, anything you imagine.

    What are your thoughts about such a tool for decred ?
     
  2. Noah

    Noah Member
    Advocate (Twitter)

    Feb 1, 2016
    154
    97
    Male
    Amsterdam
    Great idea! Although I think this issue will be solved as soon as there is a good GUI wallet available... (soon, I hope)
     
  3. karamble

    karamble Member
    Developer

    Feb 19, 2016
    57
    71
    #3 karamble, Apr 29, 2016
    Last edited: Apr 29, 2016
    if you are working with a bash shell under linux you are able to edit your ~/.bashrc file and add aliases! So you have your tab-completion!

    Code:
    PATH=:$PATH
    alias weather='curl -4 http://wttr.in/newyork'
    
    alias dcrdstart='dcrd -u YOURUSERNAME -P YOURPASSWORD --miningaddr YOURMININGADDRESSHERE'
    alias dcrwalletstart='dcrwallet -u YOURUSERNAME -P YOURPASSWORD --walletpass YOURPUBLICPASS --balancetomaintain 1 --ticketmaxprice XYZ --enablestakemining --ticketaddress=YOURPOOLADDRESSHERE'
    
    alias getbalance='dcrctl --wallet getbalance'
    alias getstakeinfo='dcrctl --wallet getstakeinfo'
    alias unlockwallet='dcrctl --wallet walletpassphrase YOURPRIVATEPASSPHRASEHERE 0'
    alias getticketfee='dcrctl --wallet getticketfee'
    alias getnewaddress='dcrctl --wallet getnewaddress'
    alias getticketmaxprice='dcrctl --wallet getticketmaxprice'
    alias getstakedifficulty='dcrctl getstakedifficulty'
    alias getmempoolinfo='dcrctl getmempoolinfo'
    alias getblockcount='dcrctl getblockcount'
    alias getrawmempool='dcrctl getrawmempool true | more'
    
    
    poolpurchaseticket() {
        #do things with parameters like $1 such as
        dcrctl  --wallet purchaseticket "default" $1 1 YOURPOOLADDRESSHERE
    }
    alias purchaseticket=poolpurchaseticket
    
    alias setticketmaxprice='dcrctl --wallet setticketmaxprice'
    alias setticketfee='dcrctl --wallet setticketfee'
    
    
    
    Path variable set to users home directory ~/
     

Share This Page