Client sends text requests of the following form:
Fish commands are all defined, shell equivalents may vary. Fish commands always have priority: the server is expected to execute a fish command if it understands it. If it does not, however, it can try to execute a shell command. When there is no special server program, Unix shell ignores the fish command as a comment and executes the equivalent shell command(s).
Server replies are multi-line, but always end with
line. ### is a prefix to mark this line, xyz is the return code. Return codes are a superset to those used in FTP. The codes 000 and 001 are special, their meaning depends on presence of server output before the end line.
The client initiates SSH or RSH connection with echo FISH:;/bin/sh as the command executed on remote machine. This should make it possible for the server to distinguish FISH connections from normal RSH or SSH.
The first two commands sent to the server are FISH and VER to negotiate FISH protocol, its version and extensions.
The server may reply to VER command with a lines like
which indicates supported version of the FISH protocol and supported extensions.
File: Fish.c - via Midnight Commander Official Repository https://github.com/MidnightCommander/mc/blob/master/src/vfs/fish/fish.c ↩
"Mc/Fish.c at master · MidnightCommander/Mc". GitHub. https://github.com/MidnightCommander/mc/blob/master/src/vfs/fish/fish.c ↩
"Feature: Consider porting FISH(FIle transfer over SHell filesystem) from Midnight Commander · Issue #1819 · elfmz/Far2l". GitHub. https://github.com/elfmz/far2l/issues/1819 ↩
"LFTP/SRC/Fish.cc at master · lavv17/LFTP". GitHub. https://github.com/lavv17/lftp/blob/master/src/Fish.cc ↩
"Kio-extras/Fish/Fish.CPP at master · KDE/Kio-extras". GitHub. https://github.com/KDE/kio-extras/blob/master/fish/fish.cpp ↩
related commit in Emacs https://github.com/emacs-mirror/emacs/commit/03c1ad4351c10ec998410e8d34f52ac4a1a0decd#diff-96ee1cf8a36451f16ddf3f468f6ac74643eeee171d17054ca0c8cbf6653a26a8 ↩
"Re: Tramp's fish method". https://lists.gnu.org/archive/html/tramp-devel/2010-09/msg00001.html ↩