Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening a file with line number / column number specified from commandline #13913

Open
3 tasks done
core-ai-bot opened this issue Aug 31, 2021 · 1 comment
Open
3 tasks done

Comments

@core-ai-bot
Copy link
Member

Issue by petetnt
Wednesday Jun 28, 2017 at 07:19 GMT
Originally opened as adobe/brackets#13488


Prerequisites

  • Can you reproduce the problem with Debug -> Reload Without Extensions?
  • Did you perform a cursory search to see if your bug or enhancement is already reported?
  • Did you read the Troubleshooting guide?

Description

This is most likely a Brackets Shell issue too, but correct me if I am wrong but there doesn't seem to be a way to open a file to a specific line / column from command line.

In https://github.com/adobe/brackets/blob/master/src/document/DocumentCommandHandlers.js#L417-L440 we handle decorated paths inside Brackets, but if one tries to open a file with foo.js:5:5, it either:

  • Says file not found on the cmd line on MacOS
  • Throws an unknown error inside Brackets on Windows

Steps to Reproduce

  1. Create a file called foo.txt and insert the following
lazy dog jumps over brown fox
lazy dog jumps over brown fox
lazy dog jumps over brown fox
lazy dog jumps over brown fox
lazy dog jumps over brown fox
lazy dog jumps over brown fox
lazy dog jumps over brown fox
lazy dog jumps over brown fox
  1. Try to launch it from cmd line with brackets foo.txt:4:4

Expected behavior: [What you expected to happen]

File opens in Brackets with cursor set to fourth line, fourth column

Actual behavior: [What actually happened]

Error is thrown either in console or Brackets, depending on the OS.

Versions

Latest master, Win / Mac

@core-ai-bot
Copy link
Member Author

Comment by petetnt
Wednesday Jun 28, 2017 at 07:20 GMT


Related: facebook/create-react-app#2637

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant