How can I have two keystrokes to delete to either a slash or a word in zsh?

Bash behaviour I’ve just migrated from bash to zsh. In bash, I had the following line in ~/.inputrc. "eC-?": unix-filename-rubout Hence, Alt+Backspace would delete back to the previous slash, which was useful for editing paths. Separately, bash defaults to making Ctrl+w delete to the previous space, which is useful for deleting whole arguments (presuming they … Read more

Is there a nice way to set directory/project local environment variables?

I have been working on several projects, and they require different environment variables (e.g., PATH for different versions of clang executables, PYTHONPATH for several external modules). Whenever I work on one project, I have to modify these environment variables myself (e.g., change .zshrc/.bashrc and source it); and I sometimes forget and make mistakes.

List elements with spaces in zsh

I’ve been studying zsh scripting for all of 2 hours at this point and I’ve hit a wall. I want to go through a list of files that may have spaces in them. I’m open to completely different approaches than the following example so long as they’re zsh since zsh is what I’m studying, not the task I’m trying to script.