use name as GLOBSORT secondary sort key; new GLOBSORT sort specifier: `numeric'; let readonly and export work on local variables at previous scopes for both array and scalar variables

This commit is contained in:
Chet Ramey
2024-06-21 10:51:53 -04:00
parent 886e4e68be
commit ad1f497a84
29 changed files with 621 additions and 372 deletions
+14 -2
View File
@@ -71,6 +71,19 @@ extern void rl_set_screen_size (int, int);
#endif
extern void sh_set_lines_and_columns (int, int);
#ifndef HAVE_TCGETWINSIZE
int
tcgetwinsize (int fd, struct winsize *wp)
{
#if defined (TIOCGWINSZ)
return (ioctl (fd, TIOCGWINSZ, wp));
#else
errno = EINVAL;
return -1;
#endif
}
#endif
void
get_new_window_size (int from_sig, int *rp, int *cp)
{
@@ -79,8 +92,7 @@ get_new_window_size (int from_sig, int *rp, int *cp)
int tty;
tty = input_tty ();
if (tty >= 0 && (ioctl (tty, TIOCGWINSZ, &win) == 0) &&
win.ws_row > 0 && win.ws_col > 0)
if (tty >= 0 && (tcgetwinsize (tty, &win) == 0) && win.ws_row > 0 && win.ws_col > 0)
{
sh_set_lines_and_columns (win.ws_row, win.ws_col);
#if defined (READLINE)