Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Konsole Konsole
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 36
    • Merge requests 36
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • UtilitiesUtilities
  • KonsoleKonsole
  • Merge requests
  • !224

FileFilter: add line/column numbers to file urls; also match absolute paths

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Ahmad Samir requested to merge work/ahmad/grep-output into master Sep 24, 2020
  • Overview 26
  • Commits 4
  • Pipelines 0
  • Changes 8

Since there is no universal way to tell a text editor about line/column on the cli (each editor seems to have its own scheme), there is a profile option to let the user specify the command to use to open local text files, e.g.: /usr/bin/kate PATH:LINE:COLUMN /usr/bin/gedit +LINE:COLUMN PATH

then we replace PATH LINE and COLUMN to create the cmd to pass on to KIO::ApplicationLauncherJob.

Current use cases, opening a file at:

  • specific line, from the ouput of "grep -n": "path/to/some/file:123"
  • specific line/column, from the output of gcc compiler errors: "/path/to/file:123:123"
  • specific line, from the ouput of ctest, when there is a compilation error: "[/path/to/some/file(123)]"

Change the regex to also match absolute file paths, this is useful in general and also compilation errors usually use absolute file paths.

Tweak the regex matching text between two single/double quotes so that it doesn't match newline characters.

Port some usage of KRun to OpenUrlJob/ApplicationLauncherJob, bump minimum required KF5 version to 5.71 as that's where those classes were added to KIO.

Refactor the UI file to use QBoxLayouts, this way each related set of options can be put together, which makes future changes slightly easier.

Edited Nov 18, 2020 by Kurt Hindenburg
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: work/ahmad/grep-output