Skip to content

ucp doesn't like using variables as source and destination #10300

@fdncred

Description

@fdncred

Describe the bug

You cannot use variables for source and destination with ucp. See example below.

How to reproduce

  1. touch foo
  2. mkdir test
  3. let var = 'foo'
  4. let folder = 'test'
  5. cp -r $var $folder
❯ ucp -r $var $folder
Error:   × Missing file operand
   ╭─[entry #40:1:1]
 1 │ ucp -r $var $folder
   · ─┬─
   ·  ╰── Missing file operand
   ╰────
  help: Please provide source and destination paths

Expected behavior

To expand variables

Screenshots

No response

Configuration

key value
version 0.84.1
branch main
commit_hash 762fdb9
build_os macos-aarch64
build_target aarch64-apple-darwin
rust_version rustc 1.70.0 (90c541806 2023-05-31)
rust_channel 1.70.0-aarch64-apple-darwin
cargo_version cargo 1.70.0 (ec8a8a0ca 2023-04-25)
build_time 2023-09-09 19:42:53 -05:00
build_rust_channel release
allocator mimalloc
features dataframe, default, extra, sqlite, trash, which, zip
installed_plugins emoji, file, from eml, from ics, from ini, from parquet, from plist, from vcf, gstat, highlight, hist, inc, json path, periodic-table, plot, pnet, query, query json, query web, query xml, regex, str bexpand, str similarity, xyplot

Additional context

/cc @dmatos2012 @tertsdiepraam

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:coreutils-uutilsChanges relating to coreutils/uutilsstatus:needs-triageAn issue that hasn't had any proper look

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions