Commits

ZyX_I committed ceb350c

Added `cmd' option to :AuStat

  • Participants
  • Parent commits 0ca6769

Comments (0)

Files changed (3)

File plugin/aurum.vim

             \substitute(substitute(substitute(s:glogfunc['@FWC'][0],
             \'\V|*F.comm.getrepo',  '',           ''),
             \'\vfiles\s+\([^)]*\)', 'files path', ''),
-            \'\V?cmd\s\+type ""',   'cmd first (in cmds, idof command)', ''))
+            \'\Vcmd\s\+type ""',    'cmd first (in cmds, idof command)', ''))
 "▶2 annfunc
 function s:annfunc.function(opts)
     let [hasannbuf, repo, rev, file]=s:F.comm.getrrf(a:opts, 'noafile')
         call add(opts, opt)
         unlet value
     endfor
-    execute 'silent botright new'
+    execute get(a:opts, 'cmd', 'silent botright new')
                 \fnameescape('aurum://status:'.escape(a:repo.path, '\:').':'.
                 \            join(opts, ','))
 endfunction
             \                                      'deleted unknown ignored '.
             \                                      'clean all] ~start, '.
             \                                  'match /\v^[MARDUIC!?]+$/))'.
+            \           '   ?cmd       (type "")'.
             \           '}', 'filter']
 call add(s:statcomp,
-            \substitute(substitute(s:statfunc['@FWC'][0],
+            \substitute(substitute(substitute(s:statfunc['@FWC'][0],
             \'\V|*F.comm.getrepo',  '',           ''),
-            \'\vfiles\s+\([^)]*\)', 'files path', ''))
+            \'\vfiles\s+\([^)]*\)', 'files path', ''),
+            \'\Vcmd\s\+(type "")',  'cmd first (in cmds, idof command)', ''))
 "▶2 vimdfunc
 function s:vimdfunc.function(opts, ...)
     let [hasbuf, repo, rev, file]=s:F.comm.getrrf(a:opts, 'nodfile')

File test/stat.in

 :bwipeout!
 :W{{{2 show ignored
 :Run AuStatus show ignored
+:call WriteFile('w$: '.winnr('$'))
+:bwipeout!
+:W{{{1 cmd
+:Run AuStatus cmd silent\ edit
+:call WriteFile('w$: '.winnr('$'))
 :bwipeout!
 :source addmessages.vim

File test/stat.ok

 R hglines2.lst
 {{{2 show ignored
 I ignoredabc
+w$: 2
+{{{1 cmd
+A addeddef
+M nohglinesrev.lst
+! nohglines.lst
+? hglinesrev.lst
+R hglines2.lst
+w$: 1