Differences

This shows you the differences between the selected revisions of the page.

2020-02-06 2020-02-07
custom commands syntax highlighting (martin) custom-command => custom-command-local (martin)
Line 42: Line 42:
For example with a Unix-like system and a ''bash'' shell, the command will be like (note the ''!/'' [[ui_pref_integration_app#client_path|pattern]] to pass the current remote path): For example with a Unix-like system and a ''bash'' shell, the command will be like (note the ''!/'' [[ui_pref_integration_app#client_path|pattern]] to pass the current remote path):
-<code custom-command>+<code custom-command-local>
cd "!/" ; /bin/bash -login cd "!/" ; /bin/bash -login
</code> </code>
Line 50: Line 50:
A complete PuTTY command line for this will be like (change the shell path according to your system and preferences): A complete PuTTY command line for this will be like (change the shell path according to your system and preferences):
-<code custom-command>+<code custom-command-local>
"%ProgramFiles%\PuTTY\putty.exe" -t -m "%TEMP%\putty.txt" !`cmd.exe /c echo cd "!/" ; /bin/bash -login > "%TEMP%\putty.txt"` "%ProgramFiles%\PuTTY\putty.exe" -t -m "%TEMP%\putty.txt" !`cmd.exe /c echo cd "!/" ; /bin/bash -login > "%TEMP%\putty.txt"`
</code> </code>
Line 68: Line 68:
When using KiTTY in portable mode, you need to specify patterns ''!U@!@ -P !#'' in terminal client path as an alternative way to pass hostname, username and port number to KiTTY. You may also use ''%%-title "!N"%%'' to pass a session name. When using KiTTY in portable mode, you need to specify patterns ''!U@!@ -P !#'' in terminal client path as an alternative way to pass hostname, username and port number to KiTTY. You may also use ''%%-title "!N"%%'' to pass a session name.
-<code custom-command>+<code custom-command-local>
kitty.exe !U@!@ -P !# -title "!N" kitty.exe !U@!@ -P !# -title "!N"
</code> </code>
Line 74: Line 74:
To open KiTTY in the same directory as WinSCP, you can use either the same [[#putty_startup_directory|technique as with PuTTY]]; or use KiTTY's [[https://www.9bis.net/kitty/#!pages/CommandLine.md|''-cmd'' switch]] to avoid use of temporary file: To open KiTTY in the same directory as WinSCP, you can use either the same [[#putty_startup_directory|technique as with PuTTY]]; or use KiTTY's [[https://www.9bis.net/kitty/#!pages/CommandLine.md|''-cmd'' switch]] to avoid use of temporary file:
-<code custom-command>+<code custom-command-local>
kitty.exe -cmd "cd '!/'" kitty.exe -cmd "cd '!/'"
</code> </code>
Line 86: Line 86:
If you want to use Win32-OpenSSH ''ssh'' client from, instead of PuTTY, you need to configure the following command [[ui_pref_integration_app|preferences]]: &winpath &win64 If you want to use Win32-OpenSSH ''ssh'' client from, instead of PuTTY, you need to configure the following command [[ui_pref_integration_app|preferences]]: &winpath &win64
-<code custom-command>+<code custom-command-local>
%SystemRoot%\Sysnative\OpenSSH\ssh.exe !U@!@ -p !# %SystemRoot%\Sysnative\OpenSSH\ssh.exe !U@!@ -p !#
</code> </code>
Line 94: Line 94:
You can also have the remote shell open in the same working directory as WinSCP, using a [[integration_putty#putty_startup_directory|similar trick as with PuTTY]]: You can also have the remote shell open in the same working directory as WinSCP, using a [[integration_putty#putty_startup_directory|similar trick as with PuTTY]]:
-<code custom-command>+<code custom-command-local>
%SystemRoot%\Sysnative\OpenSSH\ssh.exe !U@!@ -p !# -t "cd !/ ; /bin/bash" %SystemRoot%\Sysnative\OpenSSH\ssh.exe !U@!@ -p !# -t "cd !/ ; /bin/bash"
</code> </code>
Line 104: Line 104:
If you want to use OpenSSH ''ssh'' client in [[https://docs.microsoft.com/en-us/windows/wsl/about|Windows Subsystem for Linux]],((Also known as "Bash on Ubuntu on Windows".)) instead of PuTTY, you need to configure the following command [[ui_pref_integration_app|preferences]]: &winpath &win64 If you want to use OpenSSH ''ssh'' client in [[https://docs.microsoft.com/en-us/windows/wsl/about|Windows Subsystem for Linux]],((Also known as "Bash on Ubuntu on Windows".)) instead of PuTTY, you need to configure the following command [[ui_pref_integration_app|preferences]]: &winpath &win64
-<code custom-command>+<code custom-command-local>
"%SystemRoot%\Sysnative\bash.exe" -c "ssh !U@!@ -p !#" "%SystemRoot%\Sysnative\bash.exe" -c "ssh !U@!@ -p !#"
</code> </code>
Line 112: Line 112:
You can also have the remote shell open in the same working directory as WinSCP, using a [[integration_putty#putty_startup_directory|similar trick as with PuTTY]]: You can also have the remote shell open in the same working directory as WinSCP, using a [[integration_putty#putty_startup_directory|similar trick as with PuTTY]]:
-<code custom-command>+<code custom-command-local>
"%SystemRoot%\Sysnative\bash.exe" -c "ssh !U@!@ -p !# -t 'cd !/ ; /bin/bash'" "%SystemRoot%\Sysnative\bash.exe" -c "ssh !U@!@ -p !# -t 'cd !/ ; /bin/bash'"
</code> </code>
Line 120: Line 120:
If you want to run the ''ssh'' in more advanced console window, you can use for example [[https://conemu.github.io/|ConEmu]]: &winpath &win32 &win64 If you want to run the ''ssh'' in more advanced console window, you can use for example [[https://conemu.github.io/|ConEmu]]: &winpath &win32 &win64
-<code custom-command>+<code custom-command-local>
"C:\Program Files\ConEmu\ConEmu64.exe" -run bash.exe -c "ssh !U@!@ -p !#" "C:\Program Files\ConEmu\ConEmu64.exe" -run bash.exe -c "ssh !U@!@ -p !#"
</code> </code>

Last modified: by martin