edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] wordexp again
@ 2015-04-16 21:40 Karl Dahlke
  2015-04-17  7:12 ` Adam Thompson
  0 siblings, 1 reply; 33+ messages in thread
From: Karl Dahlke @ 2015-04-16 21:40 UTC (permalink / raw)
  To: Edbrowse-dev

I made one common routine to protect a file name or directory name from
shell expansion, it's the same code I was using before, but now it is shared
between the directory scan and the plugin commands.
Ok, that's good software practice, but it exposed a bug
that I think was there all along.
You can't edit a directory with a backslash in it.

mkdir "a\\b"
cd a?b
touch foo bar
cd ..
edbrowse a?b

Try it before or after my latest push.
The files therein just don't show up,
because wordexp doesn't expand a\\b/* properly.
and that is the proper escaping.
At the shell prompt
ls a\\b/*
works fine.
And it all works through the plugin system, i.e. a\b.pdf becomes
pdftohtml a\\b.pdf
This seems to be a bug in wordexp, at least my wordexp,
and I'm really not sure what to do about it.

Karl Dahlke

^ permalink raw reply	[flat|nested] 33+ messages in thread
* [Edbrowse-dev]  wordexp again
@ 2015-01-09 22:44 Karl Dahlke
  0 siblings, 0 replies; 33+ messages in thread
From: Karl Dahlke @ 2015-01-09 22:44 UTC (permalink / raw)
  To: Edbrowse-dev

Ok, it's fixed.
Forgot that space is a shell meta character as far as wordexp is concerned.
Also tab.

Karl Dahlke

^ permalink raw reply	[flat|nested] 33+ messages in thread
* [Edbrowse-dev]  wordexp again
@ 2015-01-09 22:19 Karl Dahlke
  2015-01-09 22:29 ` Chris Brannon
  0 siblings, 1 reply; 33+ messages in thread
From: Karl Dahlke @ 2015-01-09 22:19 UTC (permalink / raw)
  To: Edbrowse-dev

I fixed the ~ alone bug, it was just one line of code.

As for your other bug foobar/{1,2,3}
I can't reproduce it. It works fine for me.
I edit foobar and get the 3 files.
Not sure how to procede with this one.

Karl Dahlke

^ permalink raw reply	[flat|nested] 33+ messages in thread
* [Edbrowse-dev] wordexp again
@ 2015-01-09 21:16 Chris Brannon
  0 siblings, 0 replies; 33+ messages in thread
From: Chris Brannon @ 2015-01-09 21:16 UTC (permalink / raw)
  To: edbrowse-dev

Found a bug in nextScanFile, from stringfile.c.  To reproduce from the
shell:

mkdir 'foo bar'
touch 'foo bar'/{1,2,3} # Create 3 files
edbrowse 'foo bar'
You'll get a buffer full of junk, as the code is reading past the end of
an array.

There also seems to be a regression with tilde expansion.
>From edbrowse, e ~ used to visit the home directory.  As of the latest,
I need to use e ~/.  No big deal; it's one extra character ... but it is
a regression.

-- Chris

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2015-04-18 23:04 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-16 21:40 [Edbrowse-dev] wordexp again Karl Dahlke
2015-04-17  7:12 ` Adam Thompson
2015-04-17 12:50   ` Adam Thompson
2015-04-17 13:33     ` Karl Dahlke
2015-04-17 17:59       ` Adam Thompson
2015-04-17 13:47     ` Karl Dahlke
2015-04-17 18:01     ` Karl Dahlke
2015-04-17 21:34       ` Adam Thompson
2015-04-17 21:58         ` Adam Thompson
2015-04-17 22:25           ` Karl Dahlke
2015-04-17 22:43             ` Adam Thompson
2015-04-17 23:14               ` Karl Dahlke
2015-04-17 22:28           ` Adam Thompson
2015-04-17 22:39             ` Karl Dahlke
2015-04-18 10:53               ` Adam Thompson
2015-04-18  4:18     ` Karl Dahlke
2015-04-18 10:49       ` Adam Thompson
2015-04-18 11:34         ` Karl Dahlke
2015-04-18 13:09           ` Adam Thompson
2015-04-18 19:33             ` Chris Brannon
2015-04-18 20:05               ` Adam Thompson
2015-04-18 23:03                 ` Chris Brannon
2015-04-18 12:36         ` Karl Dahlke
2015-04-18 12:54           ` Adam Thompson
2015-04-18 13:09             ` Karl Dahlke
2015-04-18 13:24               ` Adam Thompson
2015-04-18 13:45                 ` Karl Dahlke
2015-04-18 17:44                   ` Adam Thompson
2015-04-18 19:48                     ` Karl Dahlke
  -- strict thread matches above, loose matches on Subject: below --
2015-01-09 22:44 Karl Dahlke
2015-01-09 22:19 Karl Dahlke
2015-01-09 22:29 ` Chris Brannon
2015-01-09 21:16 Chris Brannon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).