-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Specify baks by number from "main" bak list #84
Comments
You can, actually, but I'm clearly not making it obvious enough if you're here! It's only clear if you do the full help for a specific command, which ain't great. For the record, though,
Also works on |
@ChanceNCounter The documentation is clear enough. I don't think we mean the same thing. And it seems I made a mistake -- Let me explain more clearly by example:
I can do |
This is a trickier proposition. It's probably doable, but bak doesn't currently check the list order between different source files. That is, each bakfile of the same original is reliably ordered by creation date, and their indices only change if older baks are deleted. However, nothing currently guarantees the order of different originals in I have given thought to a "live" menu, with a curses-like interface that would have a persistent db connection. Another option might be |
@veracioux condescending if you are familiar, but it's just occurred to me that the reason this has not annoyed me so far is my somewhat determined use of bang ( But, in the meantime, it makes this particular thing less annoying for me, so I should make sure you and other potential readers are aware of some fairly "basic" ones besides the ubiquitous bak down foo.txt
bak down !$ #bak down foo.txt
echo "bar baz" >> foo.txt
bak down !-2$ #bak down [final arg from 2 commands ago] --> bak down foo.txt
!-3 #[repeat 3 commands ago] --> bak down foo.txt Still not perfect, but, especially if your prompt displays history numbers, it's an easyish way to repeat ops like these. That's why I got this far into dev without even noticing this rather obvious problem 👅 |
@ChanceNCounter Thank you for that. I knew about bangs but I never used them since I use fish as my default shell. Luckily there is an extension that emulates that. But another use case where bangs don't help is when I want to |
Excellent point. |
Hi, I have used this program for a few days and I really like it. One thing did annoy me though. When the file I am backing up is nested deep in a directory tree under my working directory, and I want to restore it using
bak down
, it is not very convenient to have to specify the file's relative path.It would be very useful if we could specify the file to restore with
bak down
using the number, as we can do withbak del
. Maybe there is a use case to enable that for other commands as well.In order to disambiguate a bakfile number from a file that has a number as its name, maybe we can prepend the number with something. For example
bak down @1
will restore the bak file numbered 1 andbak down 1
will restore the file./1
. You may have better suggestions than this.The text was updated successfully, but these errors were encountered: