Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement