Last parameter of command line argument ignored/deleted

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
emakaay
Junior Member
Junior Member
Posts: 2
Joined: 2022-08-14, 11:08 UTC

Last parameter of command line argument ignored/deleted

Post by *emakaay »

Hi,

I'm using the command line option in total commander quite a lot.

For instance to clone a git repository. I use the following command:
- git clone ssh://<something> <directoryname>

The last argument (<directoryname)> is lost.
I could not figure out why this was, because this used to work
yesterday I found out that I can use Shift_return to execute command in separate dos-box, that doesn't close automatically.
There I could see (in the title of the dos-box) that the last argument was not present.

I think this changed from TC 9.5 to 10.00
(with 9.5 this was working fine)

Any reason for this, or how to fix it (from my side?)

(BTW: when i execute the command in a separate dos-box manually (the same command as in command-line from within TC) it works perfectly)

Thanks in advance,
Erik
Last edited by emakaay on 2022-08-17, 21:19 UTC, edited 1 time in total.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48012
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Last parameter of command line argument ignored/deleted

Post by *ghisler(Author) »

I tried
git clone ssh://test c:\test
and got an error from git:
fatal: destination path 'c:\test' already exists and is not an empty directory.

So the parameter does get passed to git here from the TC command line.

I'm on Windows 11 and tried with TC 32-bit and 64-bit.

Maybe there is a git.bat in the path which only handles one parameter? Does it work when you change git to git.exe?
Also what does the '7' do at the end of your command? I assume that it's just a typo?
Author of Total Commander
https://www.ghisler.com
User avatar
vdijken
Member
Member
Posts: 181
Joined: 2016-07-30, 14:07 UTC
Location: The Netherlands

Re: Last parameter of command line argument ignored/deleted

Post by *vdijken »

Lately I ran into the same kind of error. It appeared that I was not the owner of the target directory; when I changed it to an existing directory of which I am the owner everything went OK to get the files from git.
emakaay
Junior Member
Junior Member
Posts: 2
Joined: 2022-08-14, 11:08 UTC

Re: Last parameter of command line argument ignored/deleted

Post by *emakaay »

Note I didn't add an absolute path name, just the name of the directory to be generated. Like: git clone ssh://test test. If the test subdirectory doesn't exists it should create the clone in that directory(when it doesn't exists). When it exists it is normal it will not be executed.

Sorry about the 7 character it shouldn't have been there.

I did replace git with git.cmd, git.bat, but that didn't work at all. Only git.exe worked, but still the clone was not created in the given subdirectory.

So I don't think my git command is captured by a script it batchfile.

Using TC 10.00 64 bit in Windows 10
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48012
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Last parameter of command line argument ignored/deleted

Post by *ghisler(Author) »

It means that the current directory is different from what you expect. When using git.bat, can you try printing the current directory with the command
cd
without parameters?
Author of Total Commander
https://www.ghisler.com
Post Reply