pijul nest
guest โ€บ [sign in] [explore]

๐Ÿ› Fix `channel rename` command to work with single <TO> argument

berkus
Jun 27, 2025, 12:38 PM
Y6GVVSZYNCJLJBXH6ANRKCN6VPWTWDU54FAW2LSJIS4LPHKYMTYQC

Dependencies

  • [2]ย Q4SVMHAE Removing --channel from the changes command
  • [3]ย YWRFRDGU ๐Ÿ“ Add explanations for channel rename/switch commands
  • [4]ย QUMQPF6L pijul channel rename arguments named after their purpose This makes it so that calling `pijul channel rename something` will be reflected as providing the "to" argument, not the "from" argument. The help output also shows the "from" argument being optional, rather than "to" being optional which did not match the way the rename worked.
  • [5]ย SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).

Change contents

  • edit in pijul/src/commands/channel.rs at line 27
    [2.182]
    [3.0]
    #[clap(name = "rename", allow_missing_positional = true)]
  • replacement in pijul/src/commands/channel.rs at line 29
    [3.13]โ†’[3.13:108](โˆ…โ†’โˆ…)
    /// Name of source channel, if [TO] is not specified, acts as TO
    from: String,
    [3.13]
    [3.108]
    /// Name of the channel to be renamed. Defaults to current channel.
    from: Option<String>,
  • replacement in pijul/src/commands/channel.rs at line 32
    [3.158]โ†’[3.158:186](โˆ…โ†’โˆ…)
    to: Option<String>,
    [3.158]
    [3.186]
    to: String,
  • edit in pijul/src/commands/channel.rs at line 34
    [2.182]โ†’[4.0:111](โˆ…โ†’โˆ…)
    #[clap(name = "rename", allow_missing_positional = true)]
    Rename { from: Option<String>, to: String },
  • resolve order conflict in pijul/src/commands/channel.rs at line 34
    [3.193]
    [2.183]