Menu

#108 Request JavaVi implement the :cd command

none
open-fixed
nobody
None
5
2022-11-16
2020-12-30
RobertS
No

As a user, I would like the ability to change the working directory from within jVi so that I can reduce typing necessary for running shell commands from a particular location.

Example behavior

:!pwd
--------------------------------------------
/bin/bash -c pwd
/home/username 
--------------------------------------------
:cd git
:!pwd
--------------------------------------------
/bin/bash -c pwd
/home/username/git

Acceptance Criteria

  • :cd mimics the behavior of vim

Discussion

  • Ernie Rael

    Ernie Rael - 2021-01-15

    This is not as simple as I'd hoped. You can't change the direct of the java runtime.
    StackOverflow
    Notice that there's a issue against java marked "won't fix".

    I'll think about how I might track a virtual cwd, a key part is detecting when :cd abc would fail. I think handling :!xxx is already done with java's process builder and you can specify a directory.

    RobertS, was the ^R in command line insert useful?

     
  • Ernie Rael

    Ernie Rael - 2022-11-16

    Available since jVi-2.0

     
  • Ernie Rael

    Ernie Rael - 2022-11-16
    • status: open --> open-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB