You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 6, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+11-14Lines changed: 11 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ The problem, of course, is remembering to delete that file when you're finished.
11
11
**bak**'s goal is simply to obviate this process. Using **bak**, you'll be able to manage your bakfiles with four simple commands:
12
12
13
13
`bak my_file` - Create a bakfile in a configured location (default: XDG_DATA_HOME/bak/bakfiles, or XDG's default location)
14
-
`bak up my_file` - Overwrite current `my_file.bak`, rather than creating a second .bakfile.
14
+
`bak up my_file` - Overwrite current `my_file.bak`, rather than creating a second .bakfile.
15
15
`bak down my_file` - Deletes `my_file` and restores it from `my_file.bak`
16
16
`bak off my_file` - Deletes `my_file.bak`, confirming by default (`bak off -q` to suppress)
17
17
@@ -25,29 +25,26 @@ Don't worry, they're easy to remember after a minute:
25
25
All of **bak**'s commands will disambiguate between multiple copies of the same file. In other words, you can `bak my_thing.txt` as many times as you want, until you're finished working, if you'd prefer to keep multiples instead of using `bak up`. At the moment, all you've got to go by are timestamps when it asks you to pick a .bakfile, but this will improve.
26
26
27
27
## Additional commands and flags
28
+
28
29
`bak down --keep my_file` - Restores from .bakfile, does not delete .bakfile
29
30
`bak diff my_file` Compare a .bakfile using `diff` (will become configurable)
30
-
`bak show my_file` View a .bakfile in $PAGER
31
-
`bak show --using exec my_file` View a .bakfile using `exec` (alias `--in`)
31
+
`bak list`/`bak list my_file` - List all .bakfiles, or just `my_file`'s
32
+
`bak open my_file` View a .bakfile in $PAGER
33
+
`bak open --using exec my_file` View a .bakfile using `exec` (alias `--in`)
32
34
33
35
examples:
34
36
35
-
bak show --using cat my_file.json
36
-
bak show --in nvim my_file.json
37
+
bak open --using cat my_file.json
38
+
bak open --in nvim my_file.json
39
+
37
40
`bak get-bak my_file` Get the abspath of a .bakfile, in case, for some reason, you want to pipe it somewhere
38
41
39
42
example (for illustrative purposes; use 'bak diff' instead):
40
43
41
-
diff $(bak get-bak my_file.json) my_file.json
42
-
43
-
## Advanced features (Not yet implemented as of Oct. 28, 2020)
44
-
**bak** is also slated to support a number of flags, as well as rich output, such as:
45
-
46
-
`bak list` - List all .bakfiles, with a bit of metadata to help with disambiguation
47
-
`bak list my_file` - List all .bakfiles *of the specified file*, with metadata
44
+
diff `bak get-bak my_file.json)` my_file.json
48
45
49
-
## Current state (updated Oct. 31, 2020)
50
-
This is a very pre-alpha version, as in, this is a spaghetti proof-of-concept. Perhaps ~~5-6~~ 12-15 hours have been spent on development so far. As such, it's only "working" in the strictest sense.
46
+
## Current state (updated Jan. 20, 2020)
47
+
This is a very pre-alpha version, as in, this is a spaghetti proof-of-concept. Perhaps ~~5-6~~~~12-15~~ 20 hours have been spent on development so far. As such, it's only "working" in the strictest sense.
51
48
52
49
At the moment, **bak** stores its database and your bakfiles in `$XDG_DATA_HOME/bak`. If `$XDG_DATA_HOME` is not set, its specified default is used, and your stuff ends up in `~/.local/share/bak`.
0 commit comments