Dolphin starts programs with a wrong current directory

Kevin Krammer kevin.krammer at gmx.at
Thu Dec 10 19:04:58 GMT 2009


On Thursday, 2009-12-10, Duncan wrote:

> # Get my path, assuming / as the directory separator.
> # These operators can be used in ${var-op-pat} constructs to
> # return the string with the matching pattern removed:
> # #  is shortest match pattern at the left  of string
> # %  is shortest match pattern at the right of string
> # ## is longest  match pattern at the left  of string
> # %% is longest  match pattern at the right of string
> # On the US keyboard layout at least, # and % are just
> # left and right of the $ var indicator, making them
> # easy to remember.  Similarly, the doubled form is
> # longer than the single, for longer matches.
> # Do remember it's the match that's /removed/.
> # When I first started, that seemed like negative
> # logic to me as I wanted the match /saved/, but that's
> # usually possible going from the other end.  Or use
> # sed/grep/cut or the like for more complicated stuff.
> mypath=${me%/*}

man 1 dirname

:)

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde/attachments/20091210/5b391779/attachment.sig>
-------------- next part --------------
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.


More information about the kde mailing list