Remnant characters when tab completing with ZSH

It seems I had issues with locale configuration and non UTF8 configuration In my case the fix was: export LC_ALL=”en_US.UTF-8″ and keep it permanent adding the line to .zshrc: echo “export LC_ALL=en_US.UTF-8” >> .zshrc More info in Ubuntu doc https://help.ubuntu.com/community/Locale

How do you pass arguments to custom zsh functions?

When defining a function, you cannot specify required arguments. That’s why using both the function keyword and parens () seems useless to me. To get the passed arguments, use positional parameters. The positional parameters provide access to the command-line arguments of a shell function, shell script, or the shell itself; […] The parameter n, where … Read more

Split string with zsh as in Python

The solution is to use the @ modifier, as indicated in the zsh docs: string=”1::3″ a=(“${(@s/:/)string}”) # @ modifier By the way, if one has the choice of the delimiter, it’s much easier and less error prone to use a newline as a delimiter. The right way to split the lines with zsh is then: … Read more

Why does rm -f ask me for confirmation on zsh?

It seems that the RM_STAR_SILENT is NOT in effect. You could do setopt rmstarsilent either in the command line or in ~/.zshrc to tell zsh to not confirm a rm *. The shell option RM_STAR_SILENT is: Do not query the user before executing rm * or rm path/*. — zshoptions(1): RM_STAR_SILENT If you want to … Read more

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