Archive for function

[tekwalk] xopen : shell function to have verbose xdg-open : Mac’s “open” alternative for Linux

Posted in AbhishekKr, Blogroll, install-on-linux with tags , , , , , , , on March 4, 2014 by abhishekkr [13/Feb/2014]

I have been using xdg-open for sometime now, it’s a utility similar to “open” utility popular among MacOSx users.

It enables you to open any file in the default “open with” program assigned to it’s type. So, just passing any type of file to this utility would let you open it in the program it’s supposed to open.

What is xdg-open?

There is just this little shell function, that makes your xdg-open usage a bit more verbose in case of errors (bad-syntax/ghost-file/ghost-program/open-failure) faced about the reason for it. And also shortens the access util name obviously.

xopen ()
xdg-open “$@”;
if [ “${_TMP_EXITCODE}” == “1” ]; then
echo “[ERROR:] Error in command line syntax”;
if [ “${_TMP_EXITCODE}” == “2” ]; then
echo “[ERROR:] One of the files passed on the command line did not exist”;
if [ “${_TMP_EXITCODE}” == “3” ]; then
echo “[ERROR:] A required tool could not be found”;
if [ “${_TMP_EXITCODE}” == “4” ]; then
echo “[ERROR:] The action failed”;

…read full blogpost here

[a.Bionic] shell.function to auto-clone all Repositories from a GitHub account

Posted in Blogroll, tutorial with tags , , , , , , , on April 30, 2013 by abhishekkr [13/Jan/2013]

a shell utility to download all repositories managed under any GitHub account in the current directory…
if the current directory has any of the repositories already cloned, it pulls the latest

usage:   $ clone-github github
would download all the repositories managed under ‘github’ account

shell function at

…click here to read full post

[a.Bionic] download all files embedded from GitHub Gist URL

Posted in ABK Labs with tags , , , , , on December 3, 2012 by abhishekkr []

a shell utility to download all parts of a GIST url at provided download path

usage e.g. $ ddl-gist /etc/profile.d/

howTo install
$ curl -L -o /etc/profile.d/

actually, if you had this utlity… the usage example would install the utlity… chicken-egg

… here to read full post