On OS X I can just "open" any file. On Windows, I can use "start". And on Linux? On modern installations, the "xdg-open" command works just fine. Unfortunately - this is not always the case. And I don't want to remember different commands for different machines. So here is the ultimate open alias setting for bash, for all systems that I use (it can be easily extended for other environments).
conditional_alias() { UNSET=false alias $1 > /dev/null 2>&1 || UNSET=true [ x$UNSET = xtrue ] && which $2 > /dev/null 2>&1 && alias $1=$2 } conditional_alias open gvfs-open conditional_alias open xdg-open conditional_alias open gnome-open conditional_alias open exo-open uname | grep MINGW > /dev/null 2>&1 && alias open=start
Nice post.
ReplyDeletehttps://nofilmschool.com/2018/08/hands-canon-cn-e-20mm-prime-lens
http://forums.debian.net/viewtopic.php?f=17&t=139115
https://community.hitachivantara.com/message/43165?commentID=43165
https://forums.stardock.com/494451/launch-legacy-desktop-app-even-if-windows-8-start-screen-is-foreground-wind
http://www.astronomy.com/news/2018/09/ai-detects-72-fast-radio-bursts-from-a-distant-unknown-source