Index: ushellexecute.pas
===================================================================
--- ushellexecute.pas	(Revision 5666)
+++ ushellexecute.pas	(Arbeitskopie)
@@ -27,7 +27,7 @@
 interface
 
 uses
-  Classes, SysUtils, uFile, uFileView;
+  Classes, SysUtils, uFile, uFileView, uFileSource;
 
 type
   TPrepareParameterOption = (ppoNormalizePathDelims, ppoReplaceTilde);
@@ -94,7 +94,9 @@
   %f - only filename
   %d - only path, without trailing delimiter
   %p - path+filename
+  %a - full archive + path + filename
   %D - current path in active or chosen panel
+  %A - current archive
 
   Choosing panel (if not given, active panel is used):
     %X[l|r|s|t] - where X is function (l - left, r - right, s - source, t - target)
@@ -136,7 +138,7 @@
                           rightPanel: TFileView;
                           activePanel: TFileView): String;
 type
-  TFunctType = (ftNone, ftName, ftDir, ftPath, ftSingleDir);
+  TFunctType = (ftNone, ftName, ftDir, ftPath, ftSingleDir, ftSource, ftSourcePath);
   TStatePos = (spNone, spPercent, spFunction, spPrefix, spPostfix,
                spGotPrefix, spSide, spIndex, spComplete);
 
@@ -146,6 +148,7 @@
     funct: TFunctType;
     files: TFiles;
     dir: String;
+    filesource: IFilesource;
     sFileIndex: String;
     prefix, postfix: String; // a string to add before/after each output
                              // (for functions giving output of multiple strings)
@@ -159,6 +162,8 @@
   inactiveFiles: TFiles;
   activeDir: String;
   inactiveDir: String;
+  activeFileSource : IFileSource;
+  inactiveFileSource : IFileSource;
   state: Tstate;
   sOutput: String = '';
   parseStartIndex: Integer;
@@ -174,6 +179,10 @@
         Result := aFile.FullPath;
       ftSingleDir:
         Result := ExcludeTrailingPathDelimiter(state.dir);
+      ftSource:
+        Result := state.filesource.GetCurrentAddress;
+      ftSourcePath:
+        Result := state.filesource.GetCurrentAddress + aFile.FullPath;
       else
         Exit('');
     end;
@@ -203,6 +212,7 @@
       pos := spNone;
       files := activeFiles;
       dir := activeDir;
+      filesource := activeFilesource;
       sFileIndex := '';
       funct := ftNone;
       functStartIndex := 0;
@@ -242,9 +252,9 @@
     end
     else
     begin
-      if state.funct in [ftName, ftPath, ftDir] then
+      if state.funct in [ftName, ftPath, ftDir, ftSourcePath] then
         sOutput := sOutput + BuildAllNames
-      else if state.funct in [ftSingleDir] then // only single current dir
+      else if state.funct in [ftSingleDir, ftSource] then // only single current dir
         sOutput := sOutput + BuildName(nil);
     end;
 
@@ -280,15 +290,19 @@
     begin
       activeFiles := leftFiles;
       activeDir := leftPanel.CurrentPath;
+      activeFilesource := leftPanel.FileSource;
       inactiveFiles := rightFiles;
       inactiveDir := rightPanel.CurrentPath;
+      inactiveFilesource := rightPanel.FileSource;
     end
     else
     begin
       activeFiles := rightFiles;
       activeDir := rightPanel.CurrentPath;
+      activeFilesource := rightPanel.FileSource;
       inactiveFiles := leftFiles;
       inactiveDir := leftPanel.CurrentPath;
+      inactiveFilesource := leftPanel.FileSource;
     end;
 
     index := 1;
@@ -328,6 +342,16 @@
                 state.funct := ftPath;
                 state.pos := spFunction;
               end;
+            'A':
+              begin
+                state.funct := ftSource;
+                state.pos := spFunction;
+              end;
+            'a':
+              begin
+                state.funct := ftSourcePath;
+                state.pos := spFunction;
+              end;
             else
               ResetState(state);
           end;
@@ -338,6 +362,7 @@
               begin
                 state.files := leftFiles;
                 state.dir := leftpanel.CurrentPath;
+                state.filesource := leftPanel.FileSource;
                 state.pos := spSide;
               end;
 
@@ -345,6 +370,7 @@
               begin
                 state.files := rightFiles;
                 state.dir := rightPanel.CurrentPath;
+                state.filesource := rightPanel.FileSource;
                 state.pos := spSide;
               end;
 
@@ -352,6 +378,7 @@
               begin
                 state.files := activeFiles;
                 state.dir := activeDir;
+                state.filesource := activeFilesource;
                 state.pos := spSide;
               end;
 
@@ -359,6 +386,7 @@
               begin
                 state.files := inactiveFiles;
                 state.dir := inactiveDir;
+                state.filesource := inactiveFilesource;
                 state.pos := spSide;
               end;
 
