zsh interview questions
Top zsh frequently asked interview questions
I've just installed zsh on my Ubuntu system. It seems zsh isn't executing ~/.profile on init. To my best understanding, this should be an automatic behavior. What am I missing?
Source: (StackOverflow)
ZSH takes about a second and a half from creating a new terminal window to being ready. I'm pretty sure that the culprit is compinit
.
I haven't been able to find good documentation on compinit,
but it looks like it should be caching all of the necessary things in some file like .zcompdump
.
Any tricks on speeding it up?
Source: (StackOverflow)
In Bash I know putting a space before a command prevents it from being kept in the history, what is the equivalent for the zshell?
Source: (StackOverflow)
OS X Lion has "Resume" feature, i. e. when you reopen an app it restores all windows and their contents. That works for Terminal as well. But if you use Zsh instead of Bash it doesn't restore opened directory. How can I fix this?
Source: (StackOverflow)
On a new setup, tmux is using bash instead of my default (zsh).
How can I force it to use zsh?
Source: (StackOverflow)
I would love to have a readable colored path. For example, instead of simply using %~ to return ~/path/to/foo
I would like to format it to ~$RED/$NOCOLORpath$RED/$NOCOLORto$RED/$NOCOLORfoo
to highlight the path separators.
Can I define the content of PROMPT so that the path expression gets re-evaluated on each display? Something like ${${(%):-%~}//\//_some_format_expression/}
obviously does not work.
Or should I hack this further, and force the PROMPT value to get reset each time we're changing a directory?
Any solution achieving the path formatting goal would be welcome.
Thanks :)
Source: (StackOverflow)
In zsh, whenever I press Fn+Delete (which is forward delete) a tilde (~) gets inserted. This indicates zsh doesn't have the key bound.
How do I bind it, and make it behave normally (delete in front of the cursor)?
Source: (StackOverflow)
I do a lot of work in the terminal so I have learned a lot about my shell of choice, zsh. What features of zsh do you use to make yourself that much more productive at work? One of my favorites is the multi-dir autocomplete. So instead of typing cd /fo{tab}/ba{tab}/ba{tab}
I can just do cd /fo/ba/ba{tab}
and save that many keystrokes!
Source: (StackOverflow)
I'm a bash user willing to switch to a more friendly and advanced shell. I read a lot of good things about zsh, but I gave a quick test at fish and it seems great too.
Both seem very close in term of features, what is your opinion about those two shells ?
Source: (StackOverflow)
Is there a way to 'reattach' a process to the shells job table after it it has been 'disowned'?
Edit: $SEARCHENGINE totally fails me. Doesn't look too good.
Source: (StackOverflow)
I follow this pattern of suspending the task and then letting it to continue too often with the Ctrl-Z bg sequence.
I was wondering is there any way to compress that to single keypress?
My shell is zsh
Source: (StackOverflow)
i'd like to start zsh similar to
zsh -c 'my_prog option1 option2'
but instead of exiting after running that command, leaving me at the propt of the invoked zsh (not wherever it is being called from). one particular use-case for this is in screenrc files, you could do something like:
screen -t my_prog 0 zsh -c 'my_prog opt1 opt2'
and after running that command you're left with a shell there instead of it closing.
Source: (StackOverflow)
when I try scp over zsh, I get
scp hostA:Descargas/debian-6.0.4-* user@192.168.1.154:Escritorio/Software/
zsh: no matches found: hostA:Descargas/debian-6.0.4-*
the same command work in bash
Source: (StackOverflow)
Using a shell like bash or zshell, how can I do a recursive 'find and replace'? In other words, I want to replace every occurrence of 'foo' with 'bar' in all files in this directory and its subdirectories.
Source: (StackOverflow)
Currently I have zsh set up in such a way that command history is shared between all sessions immediately.
Say I have a terminal emulator open with two tabs, each with a zsh session, A1 and A2. If I enter ls -la in A1, and then go to A2 and press up arrow key, I will see ls -la in the command prompt.
I would like to change it so sessions don't share the command history with each other although when you start new session it gets all the previous history from all sessions before it.
Source: (StackOverflow)