Share nushell history across panes
isolation: true was Alloy-chosen, not inherited: nushell's own default is
false. On a tiling desktop where several terminals are open at once, a
command typed thirty seconds ago in the next pane is exactly the thing a
user already knows they want.
max_size and sync_on_enter go with it. Both are verbatim nushell defaults,
so they asserted nothing and made the block read as four decisions when it
is two. What is left is annotated with why it is stated.
- Co-Authored-By
- Claude Opus 5 (1M context) <noreply@anthropic.com>
2 files changed,
+11 insertions,
-4 deletions
| 25 |
25 |
|
|
| 26 |
26 |
|
`etc/skel/.config/nushell/` in the Alloy repo:
|
| 27 |
27 |
|
|
| 28 |
|
- |
- `config.nu`: main nu configuration. Table style, history (sqlite backend), fuzzy completions, Alloy color palette applied to nu's own output. Tool integrations are deliberately *not* here: `source` is a parse-time keyword in nu, so it cannot be gated behind a runtime check without failing the parse and costing the whole file. The image writes them to `/usr/share/nushell/vendor/autoload/` instead, which nushell reads before `config.nu` runs.
|
|
28 |
+ |
- `config.nu`: main nu configuration. Table style, history (sqlite backend, shared live across panes rather than isolated per session, because several terminals at once is the normal case on a tiling desktop), fuzzy completions, Alloy color palette applied to nu's own output. Tool integrations are deliberately *not* here: `source` is a parse-time keyword in nu, so it cannot be gated behind a runtime check without failing the parse and costing the whole file. The image writes them to `/usr/share/nushell/vendor/autoload/` instead, which nushell reads before `config.nu` runs.
|
| 29 |
29 |
|
- `env.nu`: environment. `EDITOR=hx`, `VISUAL=hx`, PATH additions for `~/.local/bin` and `~/.cargo/bin`, cache directory prep for integration inits.
|
| 30 |
30 |
|
- `aliases.nu`: a small curated set (`ll`, `la`, `..`, `...`, git shortcuts). No plugin framework.
|
| 31 |
31 |
|
|
| 72 |
72 |
|
rm: { always_trash: false }
|
| 73 |
73 |
|
|
| 74 |
74 |
|
history: {
|
| 75 |
|
- |
max_size: 100_000
|
| 76 |
|
- |
sync_on_enter: true
|
|
75 |
+ |
# Upstream is Plaintext. sqlite is what gives history a session id, a
|
|
76 |
+ |
# cwd and an exit code per entry, which is what a recall worth having
|
|
77 |
+ |
# is built on.
|
| 77 |
78 |
|
file_format: "sqlite"
|
| 78 |
|
- |
isolation: true
|
|
79 |
+ |
# Upstream default, restated because Alloy is a tiling desktop where
|
|
80 |
+ |
# several terminals open at once is the normal case: a command typed
|
|
81 |
+ |
# in one pane is recallable from the pane beside it, without waiting
|
|
82 |
+ |
# for either shell to exit. The cost, honestly: recall in a shell that
|
|
83 |
+ |
# has been open all day is interleaved with whatever the other panes
|
|
84 |
+ |
# did.
|
|
85 |
+ |
isolation: false
|
| 79 |
86 |
|
}
|
| 80 |
87 |
|
|
| 81 |
88 |
|
completions: {
|