You are not logged in.
Pages: 1
Hey friends, I also posted this over at the arch forums but figured I would post here as well. I find this to be pretty handy.
One thing I enjoy on my work Mac is the 'open' command. For the uninitiated, the command is treated similar to xdg-open. This script, saved as /usr/local/bin/open has basically the same outcome as the Mac 'open' command. Try it in a directory, or try using it on some file.
xdg-open "$1" &> /dev/null &
Sometimes the simplest of things become handy. Figured I would share, cheers.
Offline
I think I used to have 'open' alias just pointing to thunar, why not "$@" instead of "$1"?
Offline
I use 'open' on a number of things that aren't just directories - like 'open file.txt' opens the text file in whatever xdg-open thinks a text file should be opened with.
As far as $1, it's just based on my MacOS experience. I have only ever passed a single argument so am just doing that But I may see what MacOS does with multiple args.
Offline
Actually the direct thunar alias did open text files as well (irc), also coming from macos btw.
Offline
From Debian Buster (ie Beryllium) there is already an "open" command. It's a Debian alternative that points by default to xdg-open, though sysadmins can set the alternative to point anywhere they want.
So you can do 'open <file>' out of the box.
xdg-open doesn't accept more than one argument though. There are various other ***-open utilities available, possibly better.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Pages: 1