Have zsh return case-insensitive auto-complete matches, but prefer exact matches
Just uncomment the following line in ~/.zshrc: # Uncomment the following line to use case-sensitive completion. # CASE_SENSITIVE=”true” It worked for me
Just uncomment the following line in ~/.zshrc: # Uncomment the following line to use case-sensitive completion. # CASE_SENSITIVE=”true” It worked for me
bindkey -l will give you a list of existing keymap names. bindkey -M <keymap> will list all the bindings in a given keymap. If you use the zsh command line in emacs mode, then the emacs keymap is likely to be most important for you. If you use it in vi mode, then you’d be … Read more
This worked for me on macOS ARM (Apple M1): /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)” and then: export PATH=”/opt/homebrew/bin:$PATH” >> ~/.zshrc
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
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
This is command autocorrection, activated by the correct option. It has nothing to do with completion. You’re seeing _ruby because zsh thinks there is no ruby command and it offers _ruby as the nearest existing match. If you’ve just installed ruby, it’s possible that zsh has memorized the list of available command earlier, and it … Read more
*BSD/Darwin (macOS): LC_ALL=C sed -i ” ‘/porn/d’ $HISTFILE Linux (GNU sed): LC_ALL=C sed -i ‘/porn/d’ $HISTFILE This will remove all lines matching “porn” from your $HISTFILE. With setopt HIST_IGNORE_SPACE, you can prepend the above command with a space character to prevent it from being written to $HISTFILE. As Tim pointed out in his comment below, … Read more
Try to add export DEFAULT_USER=$USER to your .zshrc file
The autoload feature is not available in bash, but it is in ksh (korn shell) and zsh. On zsh see man zshbuiltins. Functions are called in the same way as any other command. There can be a name conflict between a program and a function. What autoload does is to mark that name as being … Read more