diff --git a/shell/completion.nu b/shell/completion.nu index 2acf7588..3b04af44 100644 --- a/shell/completion.nu +++ b/shell/completion.nu @@ -116,7 +116,8 @@ def __fzf_list_hosts [] { ( # Process ssh config files $ssh_configs | append $ssh_configs_d | append $ssh_config_global - | where {|it| ($it | str downcase | str starts-with 'host') or ($it | str downcase | str starts-with 'hostname') } + # NOTE: str lowercase is new from Nushell 0.114.0. Please upgrade to Nushell >=0.114.0 if you are seeing `extra positional argument` error regarding `str lowercase` in this block. + | where {|it| ($it | str lowercase | str starts-with 'host') or ($it | str lowercase | str starts-with 'hostname') } | parse --regex '^\s*host(?:name)?\s+(?.+)' # Extract hosts after keyword | default { hosts: null } # Handle lines that don't match regex | get hosts