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

cd to root dir on input start with slash #2890

Closed
wants to merge 1 commit into from
Closed

Conversation

QiangF
Copy link

@QiangF QiangF commented Jul 14, 2021

If the user type the path start with /, apparently he is not looking for completion in the current dir if the current dir is not root.

@basil-conto
Copy link
Collaborator

Thanks, but can you please explain in more detail what this PR is addressing? What are the current steps you take that you think are incorrect, and which use-case does this PR target? Thanks.

@QiangF
Copy link
Author

QiangF commented Jul 15, 2021

During directory completion, ivy already treat ~ as special, when the user type ~, ivy first do a cd to the user home dir, and the subdir in ~ is supplied as candidates, not the subdir of the default directory.

This PR just add another special dir, the root dir, when I types /, I want a path that start from the root dir. Currently, I only get completions from the default dir of the current buffer.

The use-case is to achieve some ido like workflow, combined with ido-alt-done, you can walk along the dir structure to a path start from the root dir.

@basil-conto
Copy link
Collaborator

This PR just add another special dir, the root dir, when I types /, I want a path that start from the root dir.

Unless I've misunderstood something, this feature already exists: you just need to type the / twice. See (info "(ivy) File Name Completion"), as well as (info "(ivy) Using TRAMP").

@QiangF
Copy link
Author

QiangF commented Jul 16, 2021

Indeed! I just realized there is a conflicting package in my setup. Thank you so much for pointing it out.

@QiangF QiangF closed this Jul 16, 2021
@basil-conto basil-conto added the notabug Non-issue label Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notabug Non-issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants