[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gcmd-usr] Mounting folders
From: |
Micha |
Subject: |
Re: [gcmd-usr] Mounting folders |
Date: |
Fri, 19 May 2017 14:38:11 +0200 |
There is a workaround, but not perfect.
Let's take a look at the 'mount' command syntax, which is called by gcmd, with
device and mountpoint (filesystem) it is:
mount <device> <mountpoint>
So what you can do, is give a <device> like that:
> /dev/null && cd
Now the syntax parsed to the system call is:
mount >/dev/null && cd <mountpoint>
The first part, mount without any options, spits out the list of mounted
devices. That output will be redirected to device zero (i.e., dropped). The
concatenator '&&' appends another command (actually only if the first
expression returns a value of true, which it always does since it finishs
without error) and that one is a change directory. Since the mountpoint is
added after that, the result is gcmd just chanigng into that directory.
The 'not perfect' piece is, that this folder will be dealt like a device, with
its own root, so you can't leave that folder just by clicking 'up' or so. You
need to click another mountpoint (fake or not).
It shouldn't be too difficult to clone the 'device' configurator and modify it
to be a 'bookmarks' configurator, dropping the device and mount stuff, and make
it a frontend to bookmarks, but still have icons in the 'devices' list (which
should be renamed to 'places list' or so). But unfortunately its still beyond
my capabilities.
hth mi