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

Add a function or variable to get current mode #1867

Open
1 task done
ejrichards opened this issue Dec 5, 2024 · 1 comment
Open
1 task done

Add a function or variable to get current mode #1867

ejrichards opened this issue Dec 5, 2024 · 1 comment

Comments

@ejrichards
Copy link

ejrichards commented Dec 5, 2024

What new feature should Elvish have?

I'd like to have a function to get the current edit: mode, as far as I can tell this doesn't exist right now. My use case is that I like to run ls automatically after changing directories, but would like to conditionally not run it to avoid issues in location / navigation mode. Using edit:notify as recommended in the docs is a bit restricting, eg. it limits the output (seems to remove unicode icons) (this was eza being piped).

set builtin:after-chdir = [$@builtin:after-chdir {|_| eza }]

Output of "elvish -version"

0.21.0+official

Code of Conduct

@ejrichards
Copy link
Author

Some more thoughts: I went back to this and it looks like the issue was ANSI color escape codes. Maybe a better solution to the problem would be allowing edit:notify to take byte input as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ❓Triage
Development

No branches or pull requests

1 participant