question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rename Command includes backslash in command name

See original GitHub issue
IntelliJ IDEA 2022.3 EAP (Community Edition)
Build #IC-223.4884.69, built on September 22, 2022
Runtime version: 17.0.4.1+1-b597.1 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 6.0.3-76060003-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 16
Non-Bundled Plugins:
    nl.rubensten.texifyidea (0.7.24)
    com.jetbrains.hackathon.indices.viewer (1.22)
    com.firsttimeinforever.intellij.pdf.viewer.intellij-pdf-viewer (0.14.0)

Kotlin: 223-1.7.10-release-334-IJ4884.69
Current Desktop: pop:GNOME

What I did

  • Create a command
  • Attempt to rename command
  • Observe unexpected behavior

Minimal example to reproduce the problem

\newcommand{\LuckyNumber}{9}

Expected behavior

Rename dialog would list the command as LuckyNumber so as to not allow the user to accidentally destroy all usages of the command. An inline method intention (#2751) would cover that usecase.

Actual behavior

Rename dialog lists the command as \LuckyNumber which enables destroying all usages of their command, especially since the entire name starts off highlighted so an inattentive user would inadvertently remove the slash when inserting the new name

image

Also of note it yells “commands” at me 😢

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

0reactions
jojo2357commented, Nov 10, 2022

Completed insofar as the probelm caused by providing the backlash was rectified. The issue of the dialog providing the backslash is not fixed, but is less of an issue now.

To fix, run a degbug, set breakpoints deep in IJ to catch where the refactor dialog comes from and how the label text gets set. For some good info goto

https://plugins.jetbrains.com/docs/intellij/rename-refactoring.html

Read more comments on GitHub >

github_iconTop Results From Across the Web

windows 10 - Rename with a "/" in the name - Super User
In Windows command line the slash symbol / is an option symbol. So when you execute, for example, ren TODAY@WEEK TODAY/WEEK then it...
Read more >
linux - How to rename file name contains backslash in bash?
Renaming a file with backslashes is simple: mv 'a\b' 'newname' (just quote ...
Read more >
easiest way to delete backslash from file name - Ask Ubuntu
1 Answer 1 · With the Perl-based file-rename: $ rename --version /usr/bin/rename using File::Rename version 1.10 · With util-linux rename (which ...
Read more >
the slash (/) after a directory name on shell commands
I remember reading somewhere that a directory name with a slash (like dira/ ) is treated like a directory, and name with no...
Read more >
Using “/” in a Filename in Linux - Baeldung
Once we rename a file with the Unicode character in it, we can observe that our file now contains the “Division Slash” in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found