Barton E. Schaefer
d4f50f2d18
34851: fix thinko from 34093 that short-circuited some "whence -m" searches
2015-04-06 10:26:57 -07:00
Barton E. Schaefer
2335d62548
34551: Avoid adding an extra "/" to the target path in cd_try_chdir() when the current directory is "/"
2015-02-15 20:20:03 -08:00
Mikael Magnusson
0209635832
34490: Fix leak on print -zf/-sf error
2015-02-10 13:03:51 +01:00
Mikael Magnusson
2dbbc88d0b
34488: Fix use-after-free for print -zf and print -sf
2015-02-10 13:03:49 +01:00
Peter Stephenson
12b813b589
34331: better handling of NULL in cd.
...
Problem was return from symbolic link expander in weird cases
where there file system isn't behaving itself properly.
2015-01-22 20:20:15 +00:00
Peter Stephenson
0e3548994e
34329: add -S option to which and where
2015-01-20 17:31:28 +00:00
Barton E. Schaefer
3495dc5c27
34213: in previous patch, do not change usepm if it is already set
2015-01-10 10:32:31 -08:00
Barton E. Schaefer
daa788d88b
34212: do not change unset-ness of special parameters when exporting them
2015-01-10 10:32:31 -08:00
Peter Stephenson
cfd91eac07
Rearrange context saving.
...
Variables are now associated with the module that declares them, being
initialised and saved/restored there. However, as many variables are
used for communication between modules, many of them are set in multiple
places, so the assignment is ambiguous.
2015-01-09 21:33:39 +00:00
Mikael Magnusson
bc55ddf364
Fix a typo in bin_print error message
2015-01-09 12:37:25 +01:00
Barton E. Schaefer
93846edb0d
34154/34155: reorder bin_print() to avoid leaking the output descriptor when incorrect/incompatible options were passed
2015-01-07 22:45:46 -08:00
Mikael Magnusson
1507719d0a
34112: typeset: fix leak of oldval
...
Found by Coverity (Issue 1255803).
2015-01-06 23:47:30 +01:00
Mikael Magnusson
5a9be69185
34113: whence: use dupstring to not leak memory
...
All other assignments to buf use the heap, and it's never freed. Found
by Coverity (Issue 1255786).
2015-01-06 23:47:12 +01:00
Mikael Magnusson
a150563fb0
34114: emulate: Handle aborting from mixed -L/-c correctly
...
Somehow Coverity found this (Issue 1255797, Failure to restore non-local value).
2015-01-06 23:45:09 +01:00
Barton E. Schaefer
f9cc5a6e56
34093: "whence" should always return nonzero when it finds that nothing matches its arguments
2015-01-06 09:33:44 -08:00
Peter Stephenson
454bb777cf
users/19671: remove confusion with whence -a.
...
If the argument is a full path don't try to search the path for it.
2015-01-02 22:25:24 +00:00
Peter Stephenson
33d1439fdb
users/19667: whence -S shows intermediate steps in symlink expansion
2015-01-02 21:32:51 +00:00
Jun Kuriyama
e12b515082
33984: bin_dirs() should use zputs() to print metafied directory names
2014-12-16 23:40:32 -08:00
Peter Stephenson
d067ebcacd
33876: etc.: Separate errors and keyboards interrupts
...
Combination of 12 commits from interrupt_abort branch.
Basic strategy is to introduce bits to errflag and to set and
reset them separately.
Remove interrupt status on return to main keymap.
Turn off ERRFLAG_INT for always block.
Restore bit thereafter: we probably need a new variable in order
to allow user interrupts to be reset in the always block.
Add TRY_BLOCK_INTERRUPT
This works the same as TRY_BLOCK_ERROR, but for a SIGINT, too.
Ensure propagation of SIGINT from exited job.
If received by foreground job, shell uses ERRFLAG_INT, not
ERRFLAG_ERROR, to set the new state.
Reset errflag before precmd()
Add always block in _main_completion to fix ZLS_COLORS
Ensures we get the right state of $ZLS_COLORS at the end of _main_complete
even if there's an interrupt. However, the "right state" is a bit messy
as it depends on styles.
2014-12-11 09:41:17 +00:00
Barton E. Schaefer
53344183e1
33656: different algorithm for "whence -am" to produce results more consistent with "whence -m"
...
This uses the scanmatchtable routine to collect the names that match the
input pattern, then uses the original -a path search loop to generate
the output, to avoid duplicating test conditions and output formats.
2014-11-13 09:20:46 -08:00
Peter Stephenson
0ccbc3873f
Handle -a option to whence in combination with -m.
2014-11-08 20:49:07 +00:00
Barton E. Schaefer
605a73e415
33429: disallow non-integer values for HISTSIZE and SAVEHIST of "fc -p", and fix crash on zero values for same
2014-10-10 23:12:57 -07:00
Oliver Kiddle
00a654af5c
33323: fix bug in removing math functions and complete -M option to functions
2014-10-02 19:29:32 +02:00
Peter Stephenson
d3d0910293
32918: add %. to ztrftime for use in prompts
2014-07-30 12:10:15 +01:00
Barton E. Schaefer
77119afe19
unposted (see 32892): 'fc -I' is an error
2014-07-24 08:33:13 -07:00
Peter Stephenson
880020ca2e
32624: use correct scaling factor (clock ticks) for times
2014-05-29 21:40:33 +01:00
Peter Stephenson
a06cd1766a
32479: POSIXTRAPS and implicit return values.
...
With POSIXTRAPS never propagate implicit return value.
In any case if not forcing a return value don't use lastval
from within the trap, use the one from the surrounding code.
2014-03-14 12:52:41 +00:00
Peter Stephenson
ed44ddad22
32246: option "shift -p" pops arguments from end of array
2014-01-11 19:31:29 +00:00
Peter Stephenson
c866657a3c
31706: standardize handling of "test ! <x> <y> <z>"
2013-09-06 20:37:40 +01:00
Barton E. Schaefer
935758ab7f
31637: be more selective about retry of lchdir() in cd_do_chdir()
...
Change of directory should not be retried relative to the current directory
when it has already failed along some path that does not refer to the
current directory.
2013-08-18 20:24:45 -07:00
Peter Stephenson
9ebf22b34b
31631: Use cygwin_conv_path if available.
...
Prefer it to cygwin_conv_to_posix_path.
2013-08-05 19:55:15 +01:00
Peter Stephenson
9d32c82da3
17591: fix error message for invalid fd in print -u
2013-07-29 10:44:07 +01:00
Peter Stephenson
fdf2867e5f
31444: Basic code for enable/disable -p
2013-06-13 18:38:33 +01:00
Barton Schaefer
1182a75e1b
upon "read" of a short line, assign all variables passed as arguments.
...
It was noted that (print 1 2 | read one two three four) assigned values
only to $one and $two except in the case where EOF was reached.
2013-05-20 23:38:58 -07:00
Peter Stephenson
424ff5644b
users/17754: failing to retie an array
...
and colon-separated scalar shouldn't be a fatal error
2013-04-10 18:14:41 +01:00
Peter Stephenson
555b95c5f3
31060:"+" before a flag for "functions" or
...
"autoload" should suppress display of function body.
2013-02-22 20:26:32 +00:00
Bart Schaefer
3ed9e4d1b9
unposted: tweak 30949 to fix buffer pointer
2013-01-08 07:18:50 +00:00
Bart Schaefer
dda51b9dbb
30949: restore "read -q" behavior lost by 27188
2013-01-06 18:55:00 +00:00
Bart Schaefer
cba5449c3d
30786: do not enter interactive history editing or command execution if
...
"fc" is called from a ZLE widget.
2012-11-08 16:50:38 +00:00
Peter Stephenson
4b86cc48f7
30726: make shell options passed to emulate stick along with the emulation
2012-10-11 20:14:01 +00:00
Peter Stephenson
8d9cb7f42e
fix trivial typo with "functions +T"
2012-10-09 09:24:22 +00:00
Peter Stephenson
4e2cdd7956
30722: fix some cases where emulations or options were not propagated properly
...
from the emulate command
2012-10-07 19:46:46 +00:00
Peter Stephenson
321471891e
30718: emulate command evaluations should apply sticky emulation
...
to autoloads, too
2012-10-07 17:50:18 +00:00
Peter Stephenson
dbec4fa6cc
30692: allow autoload +X -m to work
...
change to _path_files to make it load in that fashion
2012-09-21 19:08:35 +00:00
Peter Stephenson
dd3a8ead16
users/17236: r and other fc output didn't metafy when listing to a file
...
other than stdout
2012-09-08 19:19:06 +00:00
Peter Stephenson
6f3ff6b653
30633: "functions -T" only traces marked function, not called functions
2012-08-21 18:03:01 +00:00
Peter Stephenson
268e56a144
30169: repeat "typeset -T" with same two first arguments is not an error
2012-08-16 14:00:11 +00:00
Peter Stephenson
129ebac4b0
Bart: 30560: unset ordinary array element by setting to null
2012-07-15 18:06:40 +00:00
Bart Schaefer
e1491b2542
30540: typeset flag handling with SECONDS
2012-06-30 17:40:18 +00:00
Peter Stephenson
d60de3001b
30469: Src/builtin.c: allow reverse listing of history using
...
fc -r, but don't allow reverse execution of commands at all.
2012-05-08 11:29:32 +00:00