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

feature request: add a 'show absolute path' toggle (and allow edits) #289

Open
1 task done
Danielkonge opened this issue Jan 22, 2024 · 5 comments
Open
1 task done
Labels
enhancement New feature or request P2 Not a priority. PRs welcome

Comments

@Danielkonge
Copy link

Did you check existing requests?

  • I have searched the existing issues

Describe the feature

This feature request might have some overlap with #117, but I think the idea is a bit different and possibly(?) easier to implement (+ it feels more intuitive to me).

I would like to add a a command that allows you to toggle between the current file/directory names for paths in oil and the full absolute paths (+ maybe also a path relative to cwd if inside it).

When showing absolute paths I would then like to be able to edit the paths as usual (in absolute form) and get the "expected" behavior (see below).

Provide background

I would like to be able to have something like the following setup.

Say I have directories
/some/path/dir1
/some/path/dir2
with a file filename inside dir1. In oil that would currently have the name filename when I am inside dir1, and I would like to be able to show its absolute path:
/some/path/dir1/filename
And if I then make an edit, say change it to
/some/path/dir2/filename,
I would like to be able to save and have the file move from dir1 to dir2.

I hope that this would not be too difficult to implement, since it would be a change in the absolute path, which should hopefully translate to a straightforward move command.

What is the significance of this feature?

strongly desired

Additional details

If you have any idea of where to start with an implementation of my suggestion, then I can spend some time on it and try to make a pull request.

@Danielkonge Danielkonge added the enhancement New feature or request label Jan 22, 2024
@stevearc
Copy link
Owner

This would be difficult for the same reasons as #117. Right now there is exactly one way to move files to another location, and there is exactly one way to represent a file in a location. Once you introduce something like this, there are now multiple ways to move a file and there are multiple ways to represent a file at a location. It's not insurmountable, but it would be quite tricky to account for all the possible edge cases.

@stevearc stevearc added the P2 Not a priority. PRs welcome label Jan 23, 2024
@Danielkonge
Copy link
Author

Danielkonge commented Jan 23, 2024

If I would like to try to implement this, would you be fine with having a seperation between the two ways of moving files and representing files through a check for whether the path has a root or not? E.g. in a Unix system, assume that anything starting with / is an absolute path and anything else is of the form currently used in oil. (I think roots are a bit weirder in Windows, but they still exist.)

Or would that break something in oil?

Edit: Actually, making a absolute-path-mode might be easier. Then oil could have a clear distinction between standard-mode and absolute-path-mode, and it would always be clear which representation and move commands to use depending on the mode.

@agus-videla
Copy link

Just bumping to say I would really like this feature also!

@simanga-dev
Copy link

I am searching for a similar feature that allows me to display the parent folder at the top, similar to how neo-tree does it.

@johnpgr
Copy link

johnpgr commented Oct 9, 2024

I am searching for a similar feature that allows me to display the parent folder at the top, similar to how neo-tree does it.

I'm also looking for that feature, maybe make it look like EMACS dired

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2 Not a priority. PRs welcome
Projects
None yet
Development

No branches or pull requests

5 participants