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

Support moving a file relative to it's current position within fsproj file #22

Open
jpierson opened this issue Jan 4, 2018 · 0 comments

Comments

@jpierson
Copy link

jpierson commented Jan 4, 2018

Concerning the suggested commands that would be supported, in the one in particular that states Move file somewhere below file Y I think it would be useful to consider the default value for Y to be the original file and thus the relative to it's current position.

Moving Constants.fs up one relative to itself:

> forklift up 1 Constants.fs

In this example I used my suggested project name forklift but it could easily be substituted with mech or whichever name is decided upon and the same goes for the up 1 syntax that I just threw out there as an example to work with.

Result:

The effect would be that of moving the file reference for Contants.fs in the following project file up one spot.

<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
+    <Compile Include="Constants.fs" />
    <Compile Include="UsesConstants.fs" />
-    <Compile Include="Constants.fs" />
    <Compile Include="Program.fs" />
  </ItemGroup>
</Project>

If the general approach is reasonable then perhaps the overall brief description for this command could instead something like Move file X somewhere below file Y where Y is optional and is the same as X by default.

How would the above up sub command work with X and Y both supplied? Proposing syntax isn't really the focus of this issue but just to demonstrate that a single sub command could cover both cases of relative translation perhaps one of the examples below would make sense.

Moving Constants.fs up one relative to the position of UsesConstants.fs

Example 1:

> forklift up 1 Constants.fs UsesConstants.fs

Example 2:

> forklift up 1 Constants.fs --from UsesConstants.fs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants