SHARE
TWEET

Untitled

a guest Apr 22nd, 2019 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Mac-style "open" command for Linux, Bash
  2. # (It supports opening multiple files at the same time with the wildcard character)
  3.  
  4. # Append to "~/.bash_rc"
  5.  
  6. # open graphical apps from CLI, discarded output
  7. open() {
  8.   # "$@" includes whitespaced filenames, $* doesn't
  9.   for i in "$@"; do
  10.     xdg-open "$i" &>/dev/null;
  11.   done
  12. }
  13.  
  14. # open graphical apps from CLI, including debugging output messages
  15. open_verbose() {
  16.   for i in "$@"; do
  17.     xdg-open "$i";
  18.   done
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top