Make shopt change local to function
The function body can be any compound command, not just a group command ( {} ). Use a sub-shell: is_hello_world() ( shopt -s nocasematch [[ “$1” =~ “hello world” ]] )
The function body can be any compound command, not just a group command ( {} ). Use a sub-shell: is_hello_world() ( shopt -s nocasematch [[ “$1” =~ “hello world” ]] )
The command shopt -s expand_aliases will allow alias expansion in non-interactive shells.
zsh uses env profile ~/.zshrc, not ~/.bashrc. so you need to append your env settings to .zshrc file and then source ~/.zshrc It must work. rbenv github link
This will work in Bash 4: ls -l {,**/}*.ext In order for the double-asterisk glob to work, the globstar option needs to be set (default: on): shopt -s globstar From man bash: globstar If set, the pattern ** used in a filename expansion con‐ text will match a files and zero or more directories and … Read more