darcs patch: Prompt.Directory: fix completion for paths containing ...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

darcs patch: Prompt.Directory: fix completion for paths containing ...

Steffen Schuldenzucker

Hey Guys,

a tiny fix. Contributing never felt this painless. Awesome work, really!

-- Steffen

1 patch for repository http://code.haskell.org/XMonadContrib:

Sun Feb 26 11:52:29 CET 2012  Steffen Schuldenzucker <sschuldenzucker at uni-bonn.de>
  * Prompt.Directory: fix completion for paths containing whitespace

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 5554 bytes
Desc: A darcs patch for your repository!
URL: <http://www.haskell.org/pipermail/xmonad/attachments/20120226/738e6d91/attachment.bin>

Reply | Threaded
Open this post in threaded view
|

darcs patch: Prompt.Directory: fix completion for paths containing ...

Gwern Branwen
On Sun, Feb 26, 2012 at 7:16 AM, Steffen Schuldenzucker
<sschuldenzucker at uni-bonn.de> wrote:

>
> Hey Guys,
>
> a tiny fix. Contributing never felt this painless. Awesome work, really!
>
> -- Steffen
>
> 1 patch for repository http://code.haskell.org/XMonadContrib:
>
> Sun Feb 26 11:52:29 CET 2012 ?Steffen Schuldenzucker <sschuldenzucker at uni-bonn.de>
> ?* Prompt.Directory: fix completion for paths containing whitespace

Are you sure that works right? It looks a little dodgy - for example,
is it right to match only on ' ' and not use something like
Data.Char.isSpace?

--
gwern
http://www.gwern.net


Reply | Threaded
Open this post in threaded view
|

darcs patch: Prompt.Directory: fix completion for paths containing ...

Steffen Schuldenzucker
On 02/26/2012 05:18 PM, Gwern Branwen wrote:

> On Sun, Feb 26, 2012 at 7:16 AM, Steffen Schuldenzucker
> <sschuldenzucker at uni-bonn.de>  wrote:
>>
>> Hey Guys,
>>
>> a tiny fix. Contributing never felt this painless. Awesome work, really!
>>
>> -- Steffen
>>
>> 1 patch for repository http://code.haskell.org/XMonadContrib:
>>
>> Sun Feb 26 11:52:29 CET 2012  Steffen Schuldenzucker<sschuldenzucker at uni-bonn.de>
>>   * Prompt.Directory: fix completion for paths containing whitespace
>
> Are you sure that works right? It looks a little dodgy - for example,
> is it right to match only on ' ' and not use something like
> Data.Char.isSpace?
>

Naah, of course you're right. In particular, it will drop backslashs
from directories containing ones. I'll fix it as soon as I find some time.


Reply | Threaded
Open this post in threaded view
|

darcs patch: Prompt.Directory: fix completion for paths containing ...

Steffen Schuldenzucker
In reply to this post by Gwern Branwen
On 02/26/2012 05:18 PM, Gwern Branwen wrote:

> On Sun, Feb 26, 2012 at 7:16 AM, Steffen Schuldenzucker
> <sschuldenzucker at uni-bonn.de>  wrote:
>>
>> Hey Guys,
>>
>> a tiny fix. Contributing never felt this painless. Awesome work, really!
>>
>> -- Steffen
>>
>> 1 patch for repository http://code.haskell.org/XMonadContrib:
>>
>> Sun Feb 26 11:52:29 CET 2012  Steffen Schuldenzucker<sschuldenzucker at uni-bonn.de>
>>   * Prompt.Directory: fix completion for paths containing whitespace
>
> Are you sure that works right? It looks a little dodgy - for example,
> is it right to match only on ' ' and not use something like
> Data.Char.isSpace?
>

Second try... (amended my previous patch)

Note that L.WorkspaceDir.changeDir still won't work without my other patch

Mon Feb 27 13:20:04 CET 2012  Steffen Schuldenzucker
<sschuldenzucker at uni-bonn.de>
   * fix L.WorkspaceDir special char handling: remove "echo -n" processing
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: prompt_directory_-fix-completion-for-paths-containing-whitespace.dpatch
URL: <http://www.haskell.org/pipermail/xmonad/attachments/20120227/1277c624/attachment.txt>

Reply | Threaded
Open this post in threaded view
|

darcs patch: Prompt.Directory: fix completion for paths containing ...

Gwern Branwen
On Mon, Feb 27, 2012 at 7:32 AM, Steffen Schuldenzucker
<sschuldenzucker at uni-bonn.de> wrote:

> On 02/26/2012 05:18 PM, Gwern Branwen wrote:
>>
>> On Sun, Feb 26, 2012 at 7:16 AM, Steffen Schuldenzucker
>> <sschuldenzucker at uni-bonn.de> ?wrote:
>>>
>>>
>>> Hey Guys,
>>>
>>> a tiny fix. Contributing never felt this painless. Awesome work, really!
>>>
>>> -- Steffen
>>>
>>> 1 patch for repository http://code.haskell.org/XMonadContrib:
>>>
>>> Sun Feb 26 11:52:29 CET 2012 ?Steffen
>>> Schuldenzucker<sschuldenzucker at uni-bonn.de>
>>> ?* Prompt.Directory: fix completion for paths containing whitespace
>>
>>
>> Are you sure that works right? It looks a little dodgy - for example,
>> is it right to match only on ' ' and not use something like
>> Data.Char.isSpace?
>>
>
> Second try... (amended my previous patch)
>
> Note that L.WorkspaceDir.changeDir still won't work without my other patch
>
> Mon Feb 27 13:20:04 CET 2012 ?Steffen Schuldenzucker
> <sschuldenzucker at uni-bonn.de>
> ?* fix L.WorkspaceDir special char handling: remove "echo -n" processing

Anyone else want to comment on this? If not, I'll push in 5 days.

--
gwern
http://www.gwern.net


Reply | Threaded
Open this post in threaded view
|

darcs patch: Prompt.Directory: fix completion for paths containing ...

Brandon Allbery
On Mon, Feb 27, 2012 at 13:23, Gwern Branwen <gwern0 at gmail.com> wrote:

> Anyone else want to comment on this? If not, I'll push in 5 days.
>

haral:42571 Z$ touch noI no\$O; O=I bash -c 'compgen -A file no$O'
noI

Is this the expected behavior?  In other words, do we expect directory
completion to expand environment variables as well as globbing, or should
it protect $ from expansion?  Also think about whether we need to protect
quotes in isSpecial.

--
brandon s allbery                                      allbery.b at gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/xmonad/attachments/20120227/a9bbf622/attachment.htm>