summarylogtreecommitdiffstats
path: root/shtick.install
blob: e3d8426a62db7397b6ce0c819c004a69388080f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
post_install() {
    cat << EOF

==> shtick has been installed!

Quick Setup (Recommended):
---------------------------
Run the interactive setup script to enable auto-sourcing:

    /usr/share/shtick/setup.sh

This will add a wrapper function to your shell config so that
aliases/env/functions work immediately without manual sourcing.

Alternative Setup:
------------------
Or add manually to your shell config (~/.bashrc, ~/.zshrc, etc.):

    source ~/.config/shtick/load_active.<shell>

Generate wrapper function:

    shtick wrapper bash    # for bash
    shtick wrapper zsh     # for zsh
    shtick wrapper fish    # for fish

Then copy the output to your shell config.

Getting Started:
----------------
    shtick init           # Show setup instructions
    shtick status         # Show current status
    shtick alias ll='ls -la'   # Create an alias

Documentation:
--------------
    /usr/share/doc/shtick/README.md

EOF
}

post_upgrade() {
    post_install

    cat << EOF

==> shtick has been upgraded to a new version!

New in v1.1.0:
--------------
• Auto-sourcing wrapper function (no more manual 'source' commands!)
• Interactive setup script at /usr/share/shtick/setup.sh
• New command: shtick wrapper

If upgrading from v1.0.x:
--------------------------
Run the setup script to enable auto-sourcing:

    /usr/share/shtick/setup.sh

Or continue using manual sourcing (your existing config still works).

EOF
}

post_remove() {
    cat << EOF

==> shtick has been removed

If you used the auto-sourcing wrapper, remove it from your shell config:
    ~/.bashrc or ~/.zshrc or ~/.config/fish/config.fish

Your shtick configurations are still at:
    ~/.config/shtick/

To remove configurations:
    rm -rf ~/.config/shtick

EOF
}