Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save juniormartinxo/ad1430b094a6c8510a9adde74bcca9c4 to your computer and use it in GitHub Desktop.

Select an option

Save juniormartinxo/ad1430b094a6c8510a9adde74bcca9c4 to your computer and use it in GitHub Desktop.

Make an alias of shopt and call it through zsh

A quick solution is described here: https://github.com/larz258/Zshopt

sudo vi /usr/bin/shopt

Inside the shopt

#!/bin/bash
args='';
for item in $@
  do
    args="$args $item";
  done
shopt $args;

make it executable

sudo chmod +x /usr/bin/shopt

Create an alias in your .zshrc

echo "alias shopt='/usr/bin/shopt'" >> ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment