~ should only be expanded if it is the first character in a pathname I think. It is not always followed by / as it could be used to refer to the home directory of a different user like this: ~user24/.bashrc I can't see if it is possible to use the home directory shortcut in the middle of a pathname. Could be worth investigating a shell, like bash, handles it? On 8/27/07, Grégory SCHMITT <gy.schmitt@xxxxxxxxx> wrote: > ----- Original Message ----- > > Date: Mon, 27 Aug 2007 10:53:07 +0200 > > De: Tobias Jakobi <liquid.acid@xxxxxxx> > > À: emelfm2@xxxxxxxxxxxxx > > Sujet: problem with automatic home directory expansion > > > Hi there, > > > > I'm using emelfm2-0.3.5 and having problem with pathnames containing > > the '~' character. > > I've already filed a bugreport in the gentoo bugzilla: > > http://bugs.gentoo.org/show_bug.cgi?id=190173 > > You're right. Tom will probably give a better answer that I am capable > of, but historically, in a Unix environment, the tilde '~' refers to > your home directory (as defined by the variable $HOME). > > If you activate the output option 'show commands', you should be able > to see that the tilde has been replaced by the path of your home > directory. > > It seems like the tilde shoulbe be treated diffrently if part of a > filename. Basically, the only case where ~ should be expanded to $HOME > that I can currently see is when it is followed by '/'. > > Well, anyway, character escaping is quite a sensitive matter in Unix; > I'm having issues with emelfm2 handling files whose name includes ~, ', > " and others. AFAIK, the ext2/ext3 filesystem authorizes any character > in a filename/pathname; only '/' is expanded, meaning a new folder. > > Best option: avoid them. But I understand it might not always be > possible. > > A workaround for emelfm2 would be to stop expanding ~ and replacing > all ~ by their hardcoded values (i.e. /home/username), but it might > break compatibility with other things and is not Unix-friendly. > > Hope this helps to understand, even if it doesn't fix anything... > > Btw, doesn anyone else know an alternate way of accessing a file, i.e > not by its name, but by a ref, inode... ? > > -- > Grégory SCHMITT <mailto:gy.schmitt@xxxxxxxxx> > > > -- > Users can unsubscribe from the list by sending email to > emelfm2-request@xxxxxxxxxxxxx with 'unsubscribe' in the subject field or by > logging into the web interface. > -- Users can unsubscribe from the list by sending email to emelfm2-request@xxxxxxxxxxxxx with 'unsubscribe' in the subject field or by logging into the web interface.