• pOS
  • Order of the Butterfly
    Order of the Butterfly
    pOS
    Posts: 216 from 2003/11/14
    From: Bavaria
    I want to do this:

    Code:

    git --no-page log --oneline --format=%cn%H


    lists all commits , line by line. Name of committer, followed by the Commit Hash.
    Problem is, that committer name can vary in length.
    Thus I use the feature to pad a placeholder to a fixed size by adding spaces to the right.

    Code:

    git --no-page log --oneline --format=%<(30)cn%H


    Shall make committer name columns fixed to size of 30 characters.

    But MorphDOS interprets the < sign as input redirection.

    Thus I need to escape it.

    Escape character in DOS is *

    Thus I tried *< , but no success.

    For normal Amiga programs using ReadArgs() one could put the argument into " ".
    The " will not become part of the value of the argument.

    This also works with git.
    However as an unix based program the " will become part of the value of the arguemnt.
    Which of course I wouldn't like to have.

    Code:

    git --no-page log --oneline --format="%<(30)cn%H"


    will escape the < for DOS, but it results in an output containing " at the start and end of any line.


    Any ideas how to solve this ?
  • »09.05.21 - 02:50
    Profile Visit Website