Skip to content

Commit

Permalink
Merge pull request #2 from IronhandedLayman/master
Browse files Browse the repository at this point in the history
Issue 1: addresses MacOS capability
  • Loading branch information
christianrondeau authored Mar 8, 2017
2 parents 0643ba8 + c79f803 commit 636b2da
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions autoload/base64.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ function! base64#strip(value)
endfunction

function! base64#encode(input)
if has("unix")
if has("macunix")
return base64#strip(system('base64', a:input))
elseif has("unix")
return base64#strip(system('base64 --wrap=0', a:input))
elseif has("win32")
return base64#strip(system('python -m base64', a:input))
Expand All @@ -13,7 +15,9 @@ function! base64#encode(input)
endfunction

function! base64#decode(input)
if has("unix")
if has("macunix")
return base64#strip(system('base64 --decode', a:input))
elseif has("unix")
return base64#strip(system('base64 --decode --wrap=0 --ignore-garbage', a:input))
elseif has("win32")
return base64#strip(system('python -m base64 -d', a:input))
Expand Down

0 comments on commit 636b2da

Please sign in to comment.