Skip to content

Commit

Permalink
fix: adjust for nushell commandline syntax deprecation (#840)
Browse files Browse the repository at this point in the history
Fixes for changes introduced by
nushell/nushell#12658
  • Loading branch information
nekowinston authored May 19, 2024
1 parent 8a77d51 commit 66c76a9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion custom-menus/fuzzy/directory.nu
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
mode: [emacs, vi_normal, vi_insert]
event: {
send: executehostcommand
cmd: "commandline -a (
cmd: "commandline edit --append (
ls **/*
| where type == dir
| get name
Expand Down
4 changes: 2 additions & 2 deletions custom-menus/fuzzy/modules.nu
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
event: {
send: executehostcommand
cmd: '
commandline --replace "use "
commandline --insert (
commandline edit --replace "use "
commandline edit --insert (
$env.NU_LIB_DIRS
| each {|dir|
ls ($dir | path join "**" "*.nu")
Expand Down
6 changes: 3 additions & 3 deletions themes/nu-themes/preview-theme.nu
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ def "nu-complete list themes" [] {

# preview completion. For this to work, it should be ran from the nu_scripts folder
def preview [theme: string@"nu-complete list themes"] {
commandline --insert $"use themes/themes/($theme).nu; $env.config.color_config = (char lparen)($theme)(char rparen); preview_theme | table -e"
commandline edit --insert $"use themes/themes/($theme).nu; $env.config.color_config = (char lparen)($theme)(char rparen); preview_theme | table -e"
}

# preview completion. For this to work, it should be ran from the nu_scripts folder
def preview_small [theme: string@"nu-complete list themes"] {
commandline --insert $"use themes/themes/($theme).nu; $env.config.color_config = (char lparen)($theme)(char rparen); preview_theme_small | table -e"
commandline edit --insert $"use themes/themes/($theme).nu; $env.config.color_config = (char lparen)($theme)(char rparen); preview_theme_small | table -e"
}

# Preview the current nushell theme, small mode
Expand Down Expand Up @@ -109,4 +109,4 @@ def preview_theme_small [] {
let table2 = ($color_table | range $row_count_third..($row_count_third * 2) | rename key2 val2)
let table3 = ($color_table | range ($row_count_third * 2)..$row_count | rename key3 val3)
echo $table1 | merge $table2 | merge $table3
}
}

0 comments on commit 66c76a9

Please sign in to comment.