jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
8.07k stars 211 forks source link

Group prefix not applied for script tasks #2272

Closed eglimi closed 3 weeks ago

eglimi commented 3 weeks ago

Describe the bug

When I use the following folder structure, no prefix is applied to the unit task.

mise
└── tasks
    └── test
        └── unit
✓ mise tasks
Name  Description  Source
unit               /tmp/mise/tasks/test/unit

According to the documentation, I expect the name of the task to be test:unit. Note that the main folder is mise, if I use .mise instead, it works as expected.

I'm not sure if this is expected and it's just a documentation issue, but I would prefer to put the tasks in mise for more visibility.

To Reproduce

install -D -m 755 /dev/null /tmp/mise/tasks/test/unit
cd /tmp/mise
mise tasks

Expected behavior

The task is grouped according to the folder structure.

✓ mise tasks
Name       Description  Source
test:unit               /tmp/.mise/tasks/test/unit

mise doctor output

version: 2024.6.2 linux-x64 (2024-06-07)
activated: yes
shims_on_path: no

build_info: 
  Target: x86_64-unknown-linux-gnu
  Features: DEFAULT, NATIVE_TLS
  Built: Fri, 7 Jun 2024 11:48:31 +0000
  Rust Version: rustc 1.78.0 (9b00956e5 2024-04-29)
  Profile: release

shell: 
  /usr/bin/zsh
  zsh 5.8 (x86_64-ubuntu-linux-gnu)

dirs: 
  data: ~/.local/share/mise
  config: ~/.config/mise
  cache: ~/.cache/mise
  state: ~/.local/state/mise
  shims: ~/.local/share/mise/shims

config_files: 
  ~/.config/mise/config.toml

backends: 
  cargo
  core
  go
  npm
  pipx
  spm
  ubi

plugins: 
  bun     (core)
  deno    (core)
  erlang  (core)
  go      (core)
  java    (core)
  node    (core)
  python  (core)
  ruby    (core)
  zig     (core)

toolset: 
  node@22.2.0  

env_vars: 
  MISE_SHELL=zsh

settings: 
  activate_aggressive = false
  all_compile = false
  always_keep_download = false
  always_keep_install = false
  asdf_compat = false
  cargo_binstall = true
  color = true
  disable_default_shorthands = false
  disable_tools = []
  experimental = true
  go_default_packages_file = "~/.default-go-packages"
  go_download_mirror = "https://dl.google.com/go"
  go_repo = "https://github.com/golang/go"
  go_set_gopath = false
  go_set_goroot = true
  go_skip_checksum = false
  http_timeout = 30
  jobs = 4
  legacy_version_file = true
  legacy_version_file_disable_tools = []
  node_compile = false
  not_found_auto_install = true
  paranoid = false
  plugin_autoupdate_last_check_duration = "7d"
  python_default_packages_file = "<redacted>/.default-python-packages"
  python_pyenv_repo = "https://github.com/pyenv/pyenv.git"
  raw = false
  trusted_config_paths = []
  quiet = false
  verbose = false
  yes = false
  ci = false
  debug = false
  trace = false
  log_level = "info"
  python_venv_auto_create = false

  [status]
  missing_tools = "if_other_versions_installed"
  show_env = false
  show_tools = false

No warnings found
No problems found
roele commented 3 weeks ago

This might be an oversight. Documentation states that tasks can reside in either .mise/tasks, mise/tasks or .config/mise/tasks/ but implementation does not yet contain the mise/tasks use-case.