Skip to content

Commit e5bd931

Browse files
feat: new adapter for S3 buckets (#677)
* Added s3 support * Save work * Various bug fixes * Minor cleanup * Minor bug fixes * Fix typo * Update following feedback + minor bug fix * Fix CI * Cleanup and remove bucket entry_type * Make suggested changes * Better aws existence check * Fix typo * refactor: don't bother caching aws executable status --------- Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com>
1 parent 01cb3a8 commit e5bd931

File tree

6 files changed

+565
-4
lines changed

6 files changed

+565
-4
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ require("oil").setup({
242242
},
243243
-- Extra arguments to pass to SCP when moving/copying files over SSH
244244
extra_scp_args = {},
245+
-- Extra arguments to pass to aws s3 when creating/deleting/moving/copying files using aws s3
246+
extra_s3_args = {},
245247
-- EXPERIMENTAL support for performing file operations with git
246248
git = {
247249
-- Return true to automatically git add/mv/rm files
@@ -355,6 +357,16 @@ This may look familiar. In fact, this is the same url format that netrw uses.
355357

356358
Note that at the moment the ssh adapter does not support Windows machines, and it requires the server to have a `/bin/sh` binary as well as standard unix commands (`ls`, `rm`, `mv`, `mkdir`, `chmod`, `cp`, `touch`, `ln`, `echo`).
357359

360+
### S3
361+
362+
This adapter allows you to browse files stored in aws s3. To use it, make sure `aws` is setup correctly and then simply open a buffer using the following name template:
363+
364+
```
365+
nvim oil-s3://[bucket]/[path]
366+
```
367+
368+
Note that older versions of Neovim don't support numbers in the url, so for Neovim 0.11 and older the url starts with `oil-sss`.
369+
358370
## Recipes
359371

360372
- [Toggle file detail view](doc/recipes.md#toggle-file-detail-view)

doc/oil.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ CONFIG *oil-confi
124124
},
125125
-- Extra arguments to pass to SCP when moving/copying files over SSH
126126
extra_scp_args = {},
127+
-- Extra arguments to pass to aws s3 when creating/deleting/moving/copying files using aws s3
128+
extra_s3_args = {},
127129
-- EXPERIMENTAL support for performing file operations with git
128130
git = {
129131
-- Return true to automatically git add/mv/rm files
@@ -428,7 +430,7 @@ icon *column-ico
428430
the icon
429431

430432
size *column-size*
431-
Adapters: files, ssh
433+
Adapters: files, ssh, s3
432434
Sortable: this column can be used in view_props.sort
433435
The size of the file
434436

@@ -476,7 +478,7 @@ atime *column-atim
476478
{format} `string` Format string (see :help strftime)
477479

478480
birthtime *column-birthtime*
479-
Adapters: files
481+
Adapters: files, s3
480482
Sortable: this column can be used in view_props.sort
481483
The time the file was created
482484

0 commit comments

Comments
 (0)