diff options
| author | Danilo M. <danix@danix.xyz> | 2026-07-31 09:04:08 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-07-31 09:04:08 +0200 |
| commit | 24282ce623c8fa2994cc51723f96adc9d64e4b67 (patch) | |
| tree | f1196ce7bfb0ef44903921150f0fc3d912be7762 /README.md | |
| parent | 2a52cb81744a55251dfd05cc1b2c4ee8dd311ebe (diff) | |
| download | tg_backup-master.tar.gz tg_backup-master.zip | |
Completes the flags, and directories for --archive-dir in both the
--opt value and --opt=value forms. --target offers only "me": real chat
handles would need a network round-trip inside a tab press, and
--list-chats already answers that question.
Installed by hand, nothing automates it. A new flag has to be added to
opts in the completion as well.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -11,6 +11,15 @@ pip install telethon cp tg_backup.py ~/bin/ && chmod +x ~/bin/tg_backup.py ``` +Tab completion for the options, if you want it: + +```bash +sudo install -m 644 tg_backup.bash-completion \ + /usr/share/bash-completion/completions/tg_backup.py +``` + +Without root, `source` that file from your `~/.bashrc` instead. It completes flags and directories for `--archive-dir`; chat targets are not completed, since listing them needs a network round-trip. + ## Setup Run it once with no arguments to create the config: @@ -116,6 +125,7 @@ Only media is saved. Message text and captions are not. | `<archive-dir>/state.json` | Resume position and saved target for that chat | | `<archive-dir>/failures.json` | Message IDs whose media never downloaded | | `<archive-dir>/*` | Downloaded media | +| `/usr/share/bash-completion/completions/tg_backup.py` | Tab completion, if installed | The session file is account credentials: anyone holding it can read your Telegram. It is created mode `0600` inside a `0700` directory. Keep it out of version control and off shared storage. |
