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

feat: support cd - (cd last) #1958

Closed
wants to merge 1 commit into from
Closed

Conversation

leyiang
Copy link

@leyiang leyiang commented Nov 27, 2024

Support cd -, go to last visit dir.
I konw in #1913 you metioned there's back and forward, but it's logic is not exactly the same with cd -, "back" shift from backstack but won't add current cwd into it.

{ on = "H", run = "back", desc = "Go back to the previous directory" },
{ on = "L", run = "forward", desc = "Go forward to the next directory" },

cd - can toggle between two places, I know we can simulate this with tabs. But I personally want the cd - feature, feel free to close or merge this PR.

Copy link
Owner

@sxyazi sxyazi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please create a new dedicated command called flip for it, because cd is not just a command, but also an important API that will be used in the plugin system.

Supporting cd - would affect cases where the directory name itself is - (I know this might not be very common, but I want to keep the behavior of cd as consistent as possible).

@leyiang leyiang closed this Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants