How to remove an entry from the history in ZSH

*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

What does autoload do in zsh?

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

MacOS gives zsh: command not found: flutter after updating path according to Flutter Official Docs [closed]

You need to update the environment path. Open terminal. vim $HOME/.zshrc Press “I” key for going to insert mode. add the following line in the opened file: export PATH=”$PATH:/YOUR_FLUTTER_DIR/flutter/bin” Press “Esc” then write :wq! in terminal and press enter to exit vim. Reopen the terminal and check “flutter doctor” If this solution did not work, … Read more

zsh history is too short [closed]

NVaughan (the OP) has already stated the answer in an update to the question: history behaves differently in bash than it does in zsh: In short: zsh: history lists only the 15 most recent history entries history 1 lists all – see below. bash: history lists all history entries. Sadly, passing a numerical operand to … Read more

How can you export your .bashrc to .zshrc?

While lhunath’s answer pushed me in the right direction, zsh does not seem to source .profile automatically. Lot’s of good info on this topic can be found on this superuser post. The adaption I’m using is putting common aliases and functions in .profile and manually sourcing them as follows: In ~/.bashrc: source ~/.profile In ~/.zshrc: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)