zsh: stop backward-kill-word on directory delimiter
For recent versions of zsh, you can simply add: autoload -U select-word-style select-word-style bash to your zshrc as described in the zsh manual (also man zshcontrib).
For recent versions of zsh, you can simply add: autoload -U select-word-style select-word-style bash to your zshrc as described in the zsh manual (also man zshcontrib).
Wether you are in bash or zsh, you can use the ! operator to recover arguments of your previous command: If we take: echo a b c d as an example !$ – the last argument: d !:*– all the arguments: a b c d (can be shorten !*) !:1 – the first argument: a … Read more
To know the code of a key, execute cat, press enter, press the key, then Ctrl+C. For me, Home sends ^[[H and End ^[[F, so i can put i my .zshrc in my home dir bindkey “^[[H” beginning-of-line bindkey “^[[F” end-of-line bindkey “^[[3~” delete-char These codes could change with the terminal emulator you use. autoload … Read more
When (non-null) output from a program doesn’t include a trailing newline, zsh adds that color-inverted % to indicate that and moves to the next line before printing the prompt; it’s generally more convenient than bash’s behavior, just starting the command prompt where the output ended.
Add following in your .bashrc or .zshrc function cd() { builtin cd “$@” if [[ -z “$VIRTUAL_ENV” ]] ; then ## If env folder is found then activate the vitualenv if [[ -d ./.env ]] ; then source ./.env/bin/activate fi else ## check the current folder belong to earlier VIRTUAL_ENV folder # if yes then … Read more
unset -f my_function will remove (or unset) the function my_function
open .zshrc in a text editor: vim ~/.zshrc Add ssh-agent to the plugins list and save: plugins=(git ssh-agent) You may want to immediately reload your .zshrc settings: source ~/.zshrc
Note, now the syntax has changed, and the line should read (As per @sheharyar): vim +PluginInstall +qall For posterity, previously, the correct line was: vim +BundleInstall +qall Should anyone other than me be looking! Note: this is in the Github README for vundle.
To see what shell is currently running – which may or may not be your default shell – use: # Prints something like ‘/bin/ksh’ or ‘-zsh’ # See bottom section if you always need the full path. ps -o comm= $$ The above assumes that the running shell is a POSIX-compatible shell. If the running … Read more
Installing a powerline patched font will solve this. This official documentation provides description about installing poweline fonts. There are two ways to enable powerline patched font in iTerm2. Set a powerline patched font as default. Set a powerline patched font for only Non-ASCII characters and use another font for code. Bonus: Collection of powerline patched … Read more