Prompt (input text --> terminal variable)

  • I'd love to have a prompt for commander that allows me to input text, like:
    press commit
    prompt: What's your message?
    commander: git add -A && git commit -m {message}

  • @JulianKingman You can do that by creating a batch/bash script file (for example, prompt-commit.bat).


    set /P msg=What is your message?
    git add -A && git commit -m %msg%


    #! /bin/bash
    echo "What is your message?"
    read msg
    git add -A && git commit -m $msg

    Then just type prompt-commit into Commander's command-lines and it will be asking for the message and execs the command with the user input. Not tested the script examples but they should work :)

Log in to reply

Looks like your connection to Freeter Forum was lost, please wait while we try to reconnect.