Commit Graph

34 Commits

Author SHA1 Message Date
riz
41482d7745 callers's -> caller's 2014-10-18 15:07:02 +00:00
snj
f0a7346d21 src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
2014-10-18 08:33:23 +00:00
christos
78dc8159da PR/48876: Dmitriy Grigoryev: Core dump in readline lib on attempted expansion
Make sure we have 2 matches before calling strcmp().
2014-06-05 22:07:42 +00:00
plunky
2b8aaed8cd NULL does not need a cast, here 2011-09-16 16:13:16 +00:00
christos
3d802cf59d re-enable -Wconversion 2011-08-16 16:25:15 +00:00
christos
c11bd863f5 pass -Wconversion 2011-07-29 23:44:44 +00:00
christos
1237974a30 - fix unused params
- unconditionalize vis.h
2011-07-29 20:58:07 +00:00
christos
b71bed95b3 KNF return (\1); -> return \1; 2011-07-29 15:16:33 +00:00
christos
a13cd75612 kill ptr_t and ioctl_t, add * sizeof(*foo) to all allocations. 2011-07-28 20:50:55 +00:00
christos
56eac9ea53 fix unused variable warnings on systems without _r functions 2011-07-28 17:33:55 +00:00
christos
b210596944 eliminate alloca for portability
portable getpw{nam,uid}
2011-07-28 00:50:23 +00:00
dholland
eb1ab8ee50 Improve previous to avoid changing the interface of an externally
exposed function. (But note that this function is neither documented
nor declared in any installed header file, and it probably should not
be externally exposed.) Related to PR 44183, closes PR 44186.
2010-12-06 00:05:38 +00:00
dholland
574c2fc5a2 add const, from PR 44183. 2010-12-02 04:42:46 +00:00
dholland
92417c82c1 Fix up bodgy code for printing completion matches; it used to sometimes
skip entries, print (null), run off the end of the array, or occasionally
receive SIGSEGV, and now will, hopefully at least, do none of that.

Based in part on the patch in PR 44183 from Sergio Acereda; I also
did some tidyup and fixed it to print top-to-bottom first like ls(1).
2010-12-02 04:35:17 +00:00
christos
a85c37d8d9 don't increment i twice in the loop. From Michael Byrnes 2010-11-15 21:24:31 +00:00
christos
cbd798c94b tidy up memory allocation and don't unnecessarily print "./" before names. 2010-06-01 18:20:26 +00:00
christos
081c24c702 PR/42637: Joachim Kuebart: Shell tab completion crashes due to libedit stack
smashing
2010-01-18 19:17:42 +00:00
christos
34e53048e6 Wide character support (UTF-8) from Johny Mattsson; currently disabled. 2009-12-30 22:37:40 +00:00
christos
b90e7198e7 improve on the listing display by printing only one character after the
filename not two, and no trailing blanks. I will revisit this when I write
the ls-F code.
2009-12-28 21:55:38 +00:00
christos
7939d24e16 fix sign compare issues. 2009-02-16 00:15:45 +00:00
christos
5c894153a3 pass lint on _LP64. 2009-02-15 21:55:23 +00:00
apb
69a442fa50 Define HAVE_STRUCT_DIRENT_D_NAMLEN in config,h, and test it when
deciding whether to use entry->d_namlen or strlen(entry->d_name).
Addresses PR 40477 by Robert Millan.
2009-01-26 17:32:41 +00:00
christos
2d18fd40a7 - insert a space after the recognized string if it was an exact match
- initialize properly the string used for completion.
From Alex Bligh alex at alex dot org dot uk
- Make char constants consistent
2009-01-11 15:00:23 +00:00
martin
3028e483e4 Convert to new 2 clause license 2008-04-29 06:53:00 +00:00
christos
72301cb079 don't use alloca with ssp. 2006-11-09 16:58:38 +00:00
christos
f1fff5b02e Change to a 3 clause copyright after permission of the holders. 2006-08-21 12:45:30 +00:00
christos
262f96a2f6 Fix reversed test; from Gerry Swislow 2005-08-03 13:41:38 +00:00
christos
19c38590ee PR/30500: Paul Shupak: Inconsistent definition of tilde_expand().
Provide a layer of indirection between the readline compatibility functions
and our internal implementation, so that we have the freedom to change the
function signature.
2005-06-11 18:18:59 +00:00
christos
3cfbfdb2ef Bug reported from Martin Dietze:
The place to change the completion_append_character is
    usually somewhere in the `rl_completion_entry_function'
    callback which is where one usually can distinguish between
    file- or dir-like entries to append a slash for dirs etc.

    This does no longer work since `fn_complete()' takes the
    `append_character' as argument before the callback is executed,
    so that changes to the variable `rl_completion_append_character'
    have in fact no effect for the current completion.

Fix by adding a function that returns the rl_completion_append_character,
when it gets passed in a filename in readline emulation.
2005-06-10 20:21:00 +00:00
christos
33b0562908 Make completion_matches non-static since readline wants it. 2005-05-18 22:34:41 +00:00
christos
182beb15f2 PR/30215: Kouichirou Hiratsuka: /bin/sh dumps core with tabcomplete
Don't core-dump when trying to complete an empty line; instead assume ./
2005-05-12 15:48:40 +00:00
dsl
2e685ade80 Use getpwuid_r(getuid(), ...) to expand ~/....
Don't replace ~xyz with /home/xyz when expanding ~
2005-05-09 20:10:33 +00:00
dsl
6ddc453ece gdb directly calls filename_completion_function() 2005-05-07 16:28:32 +00:00
dsl
41a59814ed Separate out the filename completion functions from the readline() code.
Pass in loads of parameters instead of relying on shed-loads of global
variables to modify the behaviour.
The filename completion code can now be enabled by code that uses el_gets().
(eg /bin/sh)
2005-05-07 16:01:25 +00:00