ZyX_I avatar ZyX_I committed d184b45

@%Powerline/*/aurum: Added aurum:repository segment
@%aurum/edit: Added a workaround for expand()
@%aurum/lineutils: Fixed invalid regular expression (it checked for ++nobin only, not for ++bin)

Comments (0)

Files changed (5)

aurum-addon-info.txt

     "scriptnumber": 3828,
     "files": [
         "autoload/Powerline/Functions/aurum.vim",
+        "autoload/Powerline/Matches.vim",
         "autoload/Powerline/Segments/aurum.vim",
+        "autoload/Powerline/Themes/parts/aurum.vim",
         "autoload/aurum.vim",
         "autoload/aurum/annotate.vim",
         "autoload/aurum/branch.vim",
         "autoload/aurum/lineutils.vim",
         "autoload/aurum/log.vim",
         "autoload/aurum/log/templates.vim",
+        "autoload/aurum/maputils.vim",
         "autoload/aurum/move.vim",
         "autoload/aurum/name.vim",
         "autoload/aurum/other.vim",
         "autoload/aurum/track.vim",
         "autoload/aurum/update.vim",
         "autoload/aurum/vimdiff.vim",
+        "autoload/fuf/aurum.vim",
+        "autoload/unite/kinds/aurum.vim",
+        "autoload/unite/sources/aurum.vim",
         "doc/aurum.txt",
         "ftplugin/aurumannotate.vim",
         "ftplugin/aurumcommit.vim",
         "misc/map-cmdline.csinfo",
         "plugin/aurum.vim",
         "plugin/aurum/cache.vim",
-        "python/aurum.py",
+        "python/aurum/__init__.py",
+        "python/aurum/aumercurial.py",
+        "python/aurum/utils.py",
+        "ruby/aurum-command-t-rubyinit.rb",
+        "ruby/command-t/aurum_controller.rb",
+        "ruby/command-t/finder/aurum_finder.rb",
+        "ruby/command-t/scanner/aurum_scanner.rb",
         "syntax/aurumannotate.vim",
         "syntax/aurumcommit.vim",
         "syntax/aurumlog.vim",
         "syntax/aurumstatus.vim",
+        "test/addEmessages.vim",
         "test/addmessages.vim",
         "test/cmd+maps-commit.in",
         "test/cmd+maps-commit.ok",
+        "test/cmd+maps-vimdiff.in",
+        "test/cmd+maps-vimdiff.ok",
         "test/cmd-annotate-buffers.in",
         "test/cmd-annotate-buffers.ok",
         "test/cmd-annotate.in",
         "test/cmd-update.ok",
         "test/cmd-vimdiff-full.in",
         "test/cmd-vimdiff-full.ok",
-        "test/cmd-vimdiff.in",
-        "test/cmd-vimdiff.ok",
         "test/cmdaus.in",
         "test/cmdaus.ok",
         "test/copyout-postproc.zsh",
+        "test/cptowine.zsh",
         "test/creategitrepo.zsh",
         "test/createhgrepo.zsh",
         "test/createsvnrepo.zsh",
         "test/util-add-cloned-repo.zsh",
         "test/util-add-modified-repo.zsh",
         "test/vimrc",
+        "test/wine/cmd+maps-vimdiff.ok",
         "test/wine/cmd-annotate-buffers.ok",
         "test/wine/cmd-annotate.ok",
         "test/wine/cmd-branch.ok",
         "test/wine/cmd-file.ok",
         "test/wine/cmd-grep.ok",
         "test/wine/cmd-record.ok",
-        "test/wine/cmd-vimdiff.ok",
+        "test/wine/cmd-vimdiff-full.ok",
         "test/wine/maps-annotate.ok",
         "test/wine/maps-diff.ok",
         "test/wine/maps-file.ok",
         "test/wine/maps-log.ok",
         "test/wine/maps-status.ok",
         "test/wine/opts-vimdiffusewin.ok",
-        "test/wine/vimdiff-full.ok"
+        "test/wine/regression-vimdiff-nodiffoff.ok"
     ],
 }

autoload/Powerline/Functions/aurum.vim

     return (empty(r) || r is# 'clean') ? '' : toupper(r[0])
 endfunction
 let s:_functions+=['Powerline#Functions#aurum#GetStatus']
+function Powerline#Functions#aurum#GetRepoPath()
+    let repo=aurum#repository()
+    return empty(repo) ? '' : fnamemodify(repo.path, ':~')
+endfunction
+let s:_functions+=['Powerline#Functions#aurum#GetRepoPath']

autoload/Powerline/Segments/aurum.vim

 let g:Powerline#Segments#aurum#segments = Pl#Segment#Init(['aurum',
             \ 1,
-            \ Pl#Segment#Create('branch', '%{Powerline#Functions#aurum#GetBranch("$BRANCH")}'),
-            \ Pl#Segment#Create('status', '%{Powerline#Functions#aurum#GetStatus()}'),
+            \ Pl#Segment#Create('branch',     '%{Powerline#Functions#aurum#GetBranch("$BRANCH")}'),
+            \ Pl#Segment#Create('status',     '%{Powerline#Functions#aurum#GetStatus()}'),
+            \ Pl#Segment#Create('repository', '%{Powerline#Functions#aurum#GetRepoPath()}'),
             \])

autoload/aurum/edit.vim

 "▶1
 scriptencoding utf-8
 execute frawor#Setup('1.3', {'@/resources': '0.0',
+            \                       '@/os': '0.0',
             \               '@%aurum/repo': '5.0',
             \          '@%aurum/lineutils': '0.0',
             \            '@%aurum/bufvars': '0.0',
     " XXX On windows all forward slashes are transformed to backward in @%,
     "     all backward are transformed to forward in <amatch>
     let buf=expand('<abuf>')
-    let amatch=expand('<amatch>')
+    " XXX expand("<amatch>") truncates long filenames, but replaces \ with / on 
+    "     windows
+    " let amatch=expand('<amatch>')
+    let amatch=tr(bufname(+buf), s:_r.os.sep, '/')
     let tail=amatch[len('aurum://'):]
     let command=tolower(matchstr(tail, '\v^\w+'))
     let tail=tail[len(command)+1:]

autoload/aurum/lineutils.vim

 function s:F.parsecmdarg()
     let r={}
     for arg in filter(split(v:cmdarg),
-                \     'v:val =~# ''\V\^++\v%(%(enc|ff)\=|%(no)bin)''')
+                \     'v:val =~# ''\V\^++\v%(%(enc|ff)\=|%(no)?bin)''')
         let idx=stridx(arg, '=')
         let r[arg[2]]=arg[(idx+1):]
     endfor
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.