Skip to content

Commit

Permalink
replace let-env FOO = ... by $env.FOO = ...
Browse files Browse the repository at this point in the history
  • Loading branch information
amtoine committed Jul 1, 2023
1 parent e9b13e8 commit 33ee699
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions nu_scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ i run the following:

- define the upstream remote URL
```bash
let-env NU_SCRIPTS_REMOTE = "ssh://git@github.com/goatfiles/nu_scripts.git"
$env.NU_SCRIPTS_REMOTE = "ssh://git@github.com/goatfiles/nu_scripts.git"
```
- define the local location of the `nu_scripts`
```bash
let-env NU_SCRIPTS_DIR = ($env.GIT_REPOS_HOME | path join "github.com/goatfiles/nu_scripts")
$env.NU_SCRIPTS_DIR = ($env.GIT_REPOS_HOME | path join "github.com/goatfiles/nu_scripts")
```
- make the local `nu_scripts` available to `nushell`
```bash
let-env NU_LIB_DIRS = [
$env.NU_LIB_DIRS = [
...
$env.NU_SCRIPTS_DIR
]
Expand Down
10 changes: 5 additions & 5 deletions nu_scripts/scripts/shell_prompt.nu
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,15 @@ export def-env setup [
--use-right-prompt: bool
--indicators = {}
] {
let-env PROMPT_COMMAND = if ($no_left_prompt) {
$env.PROMPT_COMMAND = if ($no_left_prompt) {
""
} else if ($use_eldyj_prompt) {
{|| create_left_prompt_eldyj}
} else {
{|| create_left_prompt}
}

let-env PROMPT_COMMAND_RIGHT = if ($use_right_prompt) {
$env.PROMPT_COMMAND_RIGHT = if ($use_right_prompt) {
{|| create_right_prompt --cwd --repo --cfg}
} else {
""
Expand All @@ -250,7 +250,7 @@ export def-env setup [
vi: {insert: ": ", normal: "> "}
} | merge ($indicators))

let-env PROMPT_INDICATOR = if ($show_prompt_indicator) { $indicators.plain } else { "" }
let-env PROMPT_INDICATOR_VI_INSERT = if ($show_prompt_indicator) { $indicators.vi.insert } else { "" }
let-env PROMPT_INDICATOR_VI_NORMAL = if ($show_prompt_indicator) { $indicators.vi.normal } else { "" }
$env.PROMPT_INDICATOR = if ($show_prompt_indicator) { $indicators.plain } else { "" }
$env.PROMPT_INDICATOR_VI_INSERT = if ($show_prompt_indicator) { $indicators.vi.insert } else { "" }
$env.PROMPT_INDICATOR_VI_NORMAL = if ($show_prompt_indicator) { $indicators.vi.normal } else { "" }
}

0 comments on commit 33ee699

Please sign in to comment.