Skip to content

I want use coreutils for day-to-day work only in cmd #151

Open

Description

@kzrnm

Currently, it is inconvenient for workflows where I want to use Unix-like commands in cmd but prefer the standard commands in pwsh.

For example, if I type rm - in pwsh and then press Tab, PowerShell completes options for Remove-Item. However, the command that actually gets executed is rm.exe from coreutils, creating an inconsistency where the completed options do not work as expected.

Activity

  1. added
    C-bugIt shouldn't be doing this.
    E-help-wantedWe encourage you to jump in on these!
    P-lowLow(er) priority. Example: Bugs in less commonly used features.
    on Jul 21, 2026
  2. a-rookie-of-C-language commented on Jul 21, 2026

    @a-rookie-of-C-language
    Contributor

    Considering coreutils’s responsibilities, your issue seems like a shell not coreuitls.
    In this repo we provide a completely shell includes auto-complete,bash (via rubash, compatible with zsh plugins ,history via reedline
    In addition you can set any coreutils like microsoft/coreutils uutils/coreutils or unixwin/winuxcmd

  3. starfishpatkhoo commented on Jul 23, 2026

    @starfishpatkhoo

    You can just do this for cmd (assuming coreutils is in your %PATH%).

    Create a file called coreutils_doskey_macros.txt somewhere with the following:

    [=coreutils [ $*
    arch=coreutils arch $*
    b2sum=coreutils b2sum $*
    base32=coreutils base32 $*
    base64=coreutils base64 $*
    basename=coreutils basename $*
    basenc=coreutils basenc $*
    cat=coreutils cat $*
    cksum=coreutils cksum $*
    comm=coreutils comm $*
    coreutils-manager=coreutils coreutils-manager $*
    cp=coreutils cp $*
    csplit=coreutils csplit $*
    cut=coreutils cut $*
    date=coreutils date $*
    df=coreutils df $*
    dirname=coreutils dirname $*
    du=coreutils du $*
    echo=coreutils echo $*
    env=coreutils env $*
    expr=coreutils expr $*
    factor=coreutils factor $*
    false=coreutils false $*
    find=coreutils find $*
    fmt=coreutils fmt $*
    fold=coreutils fold $*
    grep=coreutils grep $*
    head=coreutils head $*
    hostname=coreutils hostname $*
    join=coreutils join $*
    link=coreutils link $*
    ln=coreutils ln $*
    ls=coreutils ls $*
    md5sum=coreutils md5sum $*
    mkdir=coreutils mkdir $*
    mktemp=coreutils mktemp $*
    mv=coreutils mv $*
    nl=coreutils nl $*
    nproc=coreutils nproc $*
    numfmt=coreutils numfmt $*
    od=coreutils od $*
    paste=coreutils paste $*
    pathchk=coreutils pathchk $*
    pr=coreutils pr $*
    printenv=coreutils printenv $*
    printf=coreutils printf $*
    ptx=coreutils ptx $*
    pwd=coreutils pwd $*
    readlink=coreutils readlink $*
    realpath=coreutils realpath $*
    rm=coreutils rm $*
    rmdir=coreutils rmdir $*
    seq=coreutils seq $*
    sha1sum=coreutils sha1sum $*
    sha224sum=coreutils sha224sum $*
    sha256sum=coreutils sha256sum $*
    sha384sum=coreutils sha384sum $*
    sha512sum=coreutils sha512sum $*
    shuf=coreutils shuf $*
    sleep=coreutils sleep $*
    sort=coreutils sort $*
    split=coreutils split $*
    stat=coreutils stat $*
    sum=coreutils sum $*
    tac=coreutils tac $*
    tail=coreutils tail $*
    tee=coreutils tee $*
    test=coreutils test $*
    touch=coreutils touch $*
    tr=coreutils tr $*
    true=coreutils true $*
    truncate=coreutils truncate $*
    tsort=coreutils tsort $*
    unexpand=coreutils unexpand $*
    uniq=coreutils uniq $*
    unlink=coreutils unlink $*
    uptime=coreutils uptime $*
    wc=coreutils wc $*
    xargs=coreutils xargs $*
    yes=coreutils yes $*
    

    Then in your cmd startup/init batch file, just add or run the command:

    doskey /macrofile=path\to\coreutils_doskey_macros.txt
    

    Feel free to edit/adjust as you require.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugIt shouldn't be doing this.E-help-wantedWe encourage you to jump in on these!P-lowLow(er) priority. Example: Bugs in less commonly used features.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions