How to Open current directory in TotalCommander in Windows Terminal?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Scarb
Junior Member
Junior Member
Posts: 2
Joined: 2023-01-28, 03:53 UTC

How to Open current directory in TotalCommander in Windows Terminal?

Post by *Scarb »

I'm using git-bash with Windows Terminal, I want to open current directory in a new Total Commander tab by typing a command like `tc`.

I tried to add `alias tc='D:\\programs\\totalcmd\\TOTALCMD64.EXE \/O \/T \/R="$PWD"' in `bash.bashrc`, but it has 2 problems.

1. It create a new Total Commander instance everytime.
2. It not open current directory in my git-bash

So How to Open current directory in TotalCommander in Windows Terminal (with git-bash)?
User avatar
RoMa
Junior Member
Junior Member
Posts: 25
Joined: 2003-03-08, 11:38 UTC

Re: How to Open current directory in TotalCommander in Windows Terminal?

Post by *RoMa »

This works for me:

Code: Select all

alias tc='"/c/Program Files/util/tc/totalcmd64.exe" //O //S "//L=$(cygpath -w $PWD)" &'
details:
  • using POSIX-style path for totalcmd
  • using '//<param>' instead of '/<param>' to suppress bash's path conversion (e.g. '/c' -> 'C:')
  • coverting POSIX $PWD to windows path with cygpath
  • end command with '&' so that bash does not wait for totalcmd to terminate
Scarb
Junior Member
Junior Member
Posts: 2
Joined: 2023-01-28, 03:53 UTC

Re: How to Open current directory in TotalCommander in Windows Terminal?

Post by *Scarb »

RoMa wrote: 2023-01-28, 07:25 UTC This works for me:

Code: Select all

alias tc='"/c/Program Files/util/tc/totalcmd64.exe" //O //S "//L=$(cygpath -w $PWD)" &'
details:
  • using POSIX-style path for totalcmd
  • using '//<param>' instead of '/<param>' to suppress bash's path conversion (e.g. '/c' -> 'C:')
  • coverting POSIX $PWD to windows path with cygpath
  • end command with '&' so that bash does not wait for totalcmd to terminate
Thanks @Roma, it works for me
konfekt
Junior Member
Junior Member
Posts: 12
Joined: 2021-11-16, 09:26 UTC

Re: How to Open current directory in TotalCommander in Windows Terminal?

Post by *konfekt »

https://github.com/Konfekt/win-bash-gui-bins#file-manager ist noch ein Vorschlag.
In diesem Fall ist hierbei winpath durch cygpath zu ersetzen.
Post Reply