We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 430eb4b commit 75518b1Copy full SHA for 75518b1
docs/changelog/nushell_activation.feature.rst
@@ -0,0 +1 @@
1
+Warn on incorrect invocation of Nushell activation script - by :user:`esafak`.
src/virtualenv/activation/nushell/activate.nu
@@ -6,6 +6,18 @@
6
# but then simply `deactivate` won't work because it is just an alias to hide
7
# the "activate" overlay. You'd need to call `overlay hide foo` manually.
8
9
+# Warn users who accidentally 'source' it
10
+module warning {
11
+ export-env {
12
+ const file = path self
13
+ error make -u {
14
+ msg: $"`($file | path basename)` is meant to be used with `overlay use`, not `source`"
15
+ }
16
17
+}
18
+
19
+use warning
20
21
export-env {
22
def is-string [x] {
23
($x | describe) == 'string'
0 commit comments