Skip to content

[FEATURE] OS specific profiles (actually this time) #388

@flying-sheep

Description

@flying-sheep

Is your feature request related to a problem? Please describe.

I currently have this, and have to remember to do bombadil link -p $nu.os-info.name every time.

[profiles.linux.dots]
nushell-scripts = { source = "nushell/scripts", target = ".config/nushell/scripts" }
nushell-config = { source = "nushell/config.nu", target = ".config/nushell/config.nu" }
nushell-env = { source = "nushell/env.nu", target = ".config/nushell/env.nu" }
nushell-plugin = { source = "nushell/plugin.nu", target = ".config/nushell/plugin.nu" }

[profiles.macos.dots]
nushell-scripts = { source = "nushell/scripts", target = "Library/Application Support/nushell/scripts" }
nushell-config = { source = "nushell/config.nu", target = "Library/Application Support/nushell/config.nu" }
nushell-env = { source = "nushell/env.nu", target = "Library/Application Support/nushell/env.nu" }
nushell-plugin = { source = "nushell/plugin.nu", target = "Library/Application Support/nushell/plugin.nu" }

Describe the solution you'd like
#229 was closed with the introduction of the os variable, which can’t replace profiles, as variables can’t be used in bombadil.toml.

Describe alternatives you've considered

  1. We could also make pre-set variables (like os) available in bombadil.toml and interpolate settings, like this:

    [settings.dots]
    nushell-scripts = { source = "nushell/scripts", target = "{% if os == 'linux' %}.config{% else %}Library/Application Support{% endif %}/nushell/scripts" }
    ...
  2. [FEATURE] Allow using standard directories #258, maybe in combination with alternative 1. (i.e. instead of the syntax in #\258, just allow target = "{{ dirs.config }}/nushell/scripts")

Additional context
N/A

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions