%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Key aliases for file browser (v3) in server mode
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% FBROWSER v.3 

[Protocol]=Server

FBROWSER_FILL_LIST=\
	Set(popup,show,Please wait);\
	Set(list,replace,Files,..);\
	ExecAndSet(list,add,SAME,cd "`cat $HOME/.anyRemote/ar_storedir.tmp`";ls -F --quoting-style=shell|sed 's/\*//;s/,/\r/g;s/@//;s/$/,/'|grep '/');\
	ExecAndSet(list,add,SAME,cd "`cat $HOME/.anyRemote/ar_storedir.tmp`";ls -F --quoting-style=shell|sed 's/\*//;s/,/\r/g;s/@//;s/$/,/'|grep -v '/');\
	Set(popup,hide);

FBROWSER_GO_TO=\
	Set(list,replace,SAME,..);\
	Make(var,goto,by_value,$(Param));\
	ExecAndSet(list,add,SAME,cd "`cat $HOME/.anyRemote/ar_storedir.tmp`";if [ -d $(goto) ]; then cd $(goto);fi;ls -F --quoting-style=shell|sed 's/\*//;s/,/\r/g;s/@//;s/$/,/'|grep '/');\
	ExecAndSet(list,add,SAME,cd "`cat $HOME/.anyRemote/ar_storedir.tmp`";if [ -d $(goto) ]; then cd $(goto);fi;pwd>$HOME/.anyRemote/ar_storedir.tmp;ls -F --quoting-style=shell|sed 's/\*//;s/,/\r/g;s/@//;s/$/,/'|grep -v '/');\
	Set(popup,hide);

FBROWSER_GO_HOME=\
	Set(popup,show,Please wait);\
	Set(list,replace,SAME,..);\
	ExecAndSet(list,add,SAME,cd;ls -F --quoting-style=shell|sed 's/\*//;s/,/\r/g;s/@//;s/$/,/'|grep '/');\
	ExecAndSet(list,add,SAME,cd;pwd>.anyRemote/ar_storedir.tmp;ls -F --quoting-style=shell|sed 's/\*//;s/,/\r/g;s/@//;s/$/,/'|grep -v '/');\
	Set(popup,hide);

Push($$)=\
	Macro(FBROWSER_GO_TO);

[End]
