Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

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

Open
3 tasks done
petetnt opened this issue Jun 28, 2017 · 1 comment
Open
3 tasks done

Comments

@petetnt
Copy link
Collaborator

petetnt commented Jun 28, 2017

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

@petetnt
Copy link
Collaborator Author

petetnt commented Jun 28, 2017

Related: facebook/create-react-app#2637

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

No branches or pull requests

1 participant