chrisant996 / clink

Bash's powerful command line editing in cmd.exe
https://chrisant996.github.io/clink/
GNU General Public License v3.0
3.44k stars 135 forks source link

permament doskey #635

Closed wincmd64 closed 1 month ago

wincmd64 commented 1 month ago

so i enter DOSKEY pg=ping google.com -t it disappeared at next session I thought that clink must auto remember it - did I misunderstand?

chrisant996 commented 1 month ago

Doskey macros are not permanent in Windows. This isn't related to Clink.

garoto commented 1 month ago

doskey macros should be loaded at every cmd.exe invocation via a file containing doskey macros to be used.

I use clink.autostart for that:

> clink set clink.autostart
        Name: clink.autostart
 Description: Command to run when injected
       Value: C:\Windows\System32\doskey.exe /macrofile=c:\bin\doskey.mac

This command is automatically run when the first CMD prompt is shown after
Clink is injected.  If this is blank (the default), then Clink instead looks
for clink_start.cmd in the binaries directory and profile directory and runs
them.  Set it to "nul" to not run any autostart command.
wincmd64 commented 1 month ago

okey, i created clink_start.cmd in ..\Local\clink\ now, after cmd loaded it shows all strings in it - can it be hiden? And also Clink version, copyright and site infos

chrisant996 commented 1 month ago

okey, i created clink_start.cmd in ..\Local\clink\ now, after cmd loaded it shows all strings in it - can it be hiden?

You've written a Batch Script for CMD. By default, CMD echoes each command from a Batch Script to the screen. To hide each command, start the file with this line:

@echo off

And also Clink version, copyright and site infos

It's a setting. For more info about settings refer to: