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
Copy file name to clipboardExpand all lines: README.md
+47-1Lines changed: 47 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,8 +63,54 @@ Still not sure where or how to begin? We're happy to help! You can:
63
63
- Book a free [pairing session](https://calendly.com/d/grs-x2h-pmb/1password-shell-plugins-pairing-session) with one of our developers
64
64
- Join the [Developer Slack workspace](https://developer.1password.com/joinslack), and ask us any questions there
65
65
66
+
## Advanced Configuration
67
+
### Managing shell plugins in your own dotfiles
68
+
69
+
By default, `op plugin init` writes its configuration to `~/.config/op/plugins.sh`
70
+
and manages that file for you. If you'd rather keep your plugin configuration in
71
+
your own dotfiles (for example, tracked in version control), you can define the
72
+
shell functions yourself and source them in your shell's configuration file.
73
+
74
+
### Step 1: Define the plugin functions
75
+
Shell functions for each shell should follow this pattern. In this case,
76
+
77
+
### bash / zsh
78
+
79
+
```bash
80
+
gh() {
81
+
op plugin run -- gh "$@"
82
+
}
83
+
```
84
+
85
+
### fish
86
+
87
+
```fish
88
+
function gh --wraps gh --description "1Password shell plugin for GitHub CLI"
89
+
op plugin run -- gh $argv
90
+
end
91
+
```
92
+
93
+
### Step 2: Tell `op` your plugins are already configured
94
+
95
+
Set `OP_PLUGIN_ALIASES_SOURCED=1` so 1Password CLI knows the shell plugins have
96
+
already been set up:
97
+
98
+
### bash / zsh
99
+
100
+
```bash
101
+
export OP_PLUGIN_ALIASES_SOURCED="1"
102
+
```
103
+
104
+
### fish
105
+
```fish
106
+
set -x OP_PLUGIN_ALIASES_SOURCED 1
107
+
```
108
+
109
+
> **Note:**`op plugin init <plugin>` edits `~/.config/op/plugins.sh` directly and won't update your own dotfiles, so configure plugins manually as shown above.
110
+
111
+
66
112
## 💙 Community & Support
67
113
68
114
- File an [issue](https://github.com/1Password/shell-plugins/issues/new/choose) for bugs and feature requests
69
115
- Join the [Developer Slack workspace](https://developer.1password.com/joinslack)
70
-
- Subscribe to the [Developer Newsletter](https://1password.com/dev-subscribe/)
116
+
- Subscribe to the [Developer Newsletter](https://1password.com/dev-subscribe/)
0 commit comments