Accept cli flags in install script (#254)

This commit is contained in:
Munif Tanjim 2024-10-05 21:20:27 +06:00 committed by GitHub
parent 50fe1793b6
commit e55694d7e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -159,8 +159,10 @@ hishtory config-set filter-duplicate-commands true
If you don't need the ability to sync your shell history, you can install hiSHtory in offline mode:
```
```sh
curl https://hishtory.dev/install.py | HISHTORY_OFFLINE=true python3 -
# or
curl https://hishtory.dev/install.py | python3 - --offline
```
This disables syncing completely so that the client will not rely on the hiSHtory backend at all. You can also change the syncing status via `hishtory syncing enable` or `hishtory syncing disable`.

View File

@ -53,6 +53,8 @@ os.system('chmod +x ' + tmpFilePath)
cmd = tmpFilePath + ' install'
if os.environ.get('HISHTORY_OFFLINE'):
cmd += " --offline"
if len(sys.argv) > 1:
cmd += " " + " ".join(sys.argv[1:])
exitCode = os.system(cmd)
os.remove(tmpFilePath)
if exitCode != 0: