Review Request: Shell integration: extend commands for syncing cwd

Ivan Shapovalov intelfx100 at gmail.com
Sat Sep 29 12:47:46 UTC 2012



> On Sept. 24, 2012, 2:57 p.m., David Nolden wrote:
> > I think this is useful, but I'd prefer the "bdir!" command to do a bidirectional switch between build- and project-dir, keeping the relative sub-directory alive, eg.:
> > kdevplatform/shell$ b! -> kdevplatform_builddir/shell
> > and
> > kdevplatform_builddir/shell$ b! -> kdevplatform/shell
> > 
> > It could keep the semantics if the current path is not within the projects dir, eg.:
> > kdevplatform/shell$ b! kdevelop -> kdevelop_builddir
> > 
> > And the current behavior could be achieved through p!; b!
> > 
> > Also I think that the explanation about prefixes in "help!" is cluttering the output a bit too much, maybe this should be moved into a "help! project" subsection.
> 
> Ivan Shapovalov wrote:
>     Forward direction done; backward - seems unimplementable "cleanly" with current interfaces (which allow only item -> build directory, not vice versa). Any suggestions on how to dirty-hack the reverse translation?
> 
> David Nolden wrote:
>     Sorry, actually it would be more logical to keep up with the logic you started instead of the bidirectional switching, with these slight modifications:
>     kdevplatform_builddir/shell$ p! -> kdevplatform/shell/
>     kdevplatform_builddir/shell$ b! -> kdevplatform_builddir/
>     kdevplatform/shell$ p! -> kdevplatform/
>     kdevplatform/shell$ b! -> kdevplatform_builddir/shell/
>     
>     Eg. it would simply keep the suffix if it's switching between build/project dir, if it's already in the correct dir, then it would jump to the root.

But how to implement switching from build tree to project tree? Literally keep the path suffix?


- Ivan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106508/#review19388
-----------------------------------------------------------


On Sept. 27, 2012, 5 p.m., Ivan Shapovalov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106508/
> -----------------------------------------------------------
> 
> (Updated Sept. 27, 2012, 5 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Description
> -------
> 
> This adds 2 new commands for syncing the shell working directory (in kdevplatform_shell_environment.sh).
> These are
> - "project!", which navigates to the root directory of a project, and
> - "bdir!", which navigates to the build directory of a project (if one is returned by the build manager), using shell's cwd (if in source tree) to find the corresponding subdirectory in the build tree.
> 
> These commands take an optional argument - project name, which (if exists) is handled as a target project name prefix and is collated in case-insensitive mode.
> Thus, to navigate to kdevplatform's root directory one may type "project! kdevpl".
> If that argument is not given, the project of currently open document is selected.
> 
> Reason: I just found these commands useful. Maybe someone else also will.
> 
> 
> Diffs
> -----
> 
>   shell/projectcontroller.h e21345f 
>   shell/projectcontroller.cpp bc557bd 
>   util/kdevplatform_shell_environment.sh d428f6c 
> 
> Diff: http://git.reviewboard.kde.org/r/106508/diff/
> 
> 
> Testing
> -------
> 
> Used the newly-added commands for a sufficiently long time period (~2 weeks).
> 
> 
> Thanks,
> 
> Ivan Shapovalov
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20120929/38934076/attachment.html>


More information about the KDevelop-devel mailing list