Skip to content

Instantly share code, notes, and snippets.

@lacostenycoder
Forked from ozanmuyes/install-open.sh
Last active October 21, 2021 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lacostenycoder/3ad934aab2017bcb788deb66778ef26d to your computer and use it in GitHub Desktop.
Save lacostenycoder/3ad934aab2017bcb788deb66778ef26d to your computer and use it in GitHub Desktop.
Mac OSX 'open' equivalent for Debian for zsh
#!/bin/bash
# echoes '#!/bin/bash xdg-open "$1" &> $HOME/.xdg-open-error &' to /usr/sbin/open
echo -e "\043\041/bin/bash\n\nxdg-open \042\044\061\042 &> $HOME/.xdg-open-error &" > ozanmuyes-open
sudo mv ozanmuyes-open /usr/sbin/open
sudo chmod +x /usr/sbin/open
echo -e "\n# Mac OSX \047open\047 equivalent for Debian\nalias 'open'='/usr/sbin/open'" >> $HOME/.zshrc
. $HOME/.zshrc
echo "OK"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment