From 719e635867f85af854aa26e1e5c13fe2e8423905 Mon Sep 17 00:00:00 2001 From: CentOS Buildsys Date: Apr 19 2013 02:34:44 +0000 Subject: import zsh-5.0.2-3.el7.src.rpm --- diff --git a/.zsh.metadata b/.zsh.metadata new file mode 100644 index 0000000..1b94ba9 --- /dev/null +++ b/.zsh.metadata @@ -0,0 +1 @@ +9f55ecaaae7cdc1495f91237ba2ec087777a4ad9 SOURCES/zsh-5.0.2.tar.bz2 diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/dotzshrc b/SOURCES/dotzshrc new file mode 100644 index 0000000..9935bec --- /dev/null +++ b/SOURCES/dotzshrc @@ -0,0 +1,34 @@ +# +# .zshrc is sourced in interactive shells. +# It should contain commands to set up aliases, +# functions, options, key bindings, etc. +# + +autoload -U compinit +compinit + +#allow tab completion in the middle of a word +setopt COMPLETE_IN_WORD + +## keep background processes at full speed +#setopt NOBGNICE +## restart running processes on exit +#setopt HUP + +## history +#setopt APPEND_HISTORY +## for sharing history between zsh processes +#setopt INC_APPEND_HISTORY +#setopt SHARE_HISTORY + +## never ever beep ever +#setopt NO_BEEP + +## automatically decide when to page a list of completions +#LISTMAX=0 + +## disable mail checking +#MAILCHECK=0 + +# autoload -U colors +#colors diff --git a/SOURCES/zlogin.rhs b/SOURCES/zlogin.rhs new file mode 100644 index 0000000..5b7de4a --- /dev/null +++ b/SOURCES/zlogin.rhs @@ -0,0 +1,8 @@ +# +# /etc/zlogin and .zlogin are sourced in login shells. It should +# contain commands that should be executed only in +# login shells. It should be used to set the terminal +# type and run a series of external commands (fortune, +# msgs, from, etc). +# + diff --git a/SOURCES/zlogout.rhs b/SOURCES/zlogout.rhs new file mode 100644 index 0000000..3e78094 --- /dev/null +++ b/SOURCES/zlogout.rhs @@ -0,0 +1,7 @@ +# +# +# /etc/zlogout and ~/.zlogout are run when an interactive session ends +# +# + +clear diff --git a/SOURCES/zprofile.rhs b/SOURCES/zprofile.rhs new file mode 100644 index 0000000..03d316f --- /dev/null +++ b/SOURCES/zprofile.rhs @@ -0,0 +1,22 @@ +# +# /etc/zprofile and ~/.zprofile are run for login shells +# + +PATH="$PATH:$HOME/bin" +export PATH + +_src_etc_profile() +{ + # Make /etc/profile happier, and have possible ~/.zshenv options like + # NOMATCH ignored. + # + emulate -L ksh + + # source profile + if [ -f /etc/profile ]; then + source /etc/profile + fi +} +_src_etc_profile + +unset -f _src_etc_profile diff --git a/SOURCES/zsh-4.3.6-8bit-prompts.patch b/SOURCES/zsh-4.3.6-8bit-prompts.patch new file mode 100644 index 0000000..38cdd34 --- /dev/null +++ b/SOURCES/zsh-4.3.6-8bit-prompts.patch @@ -0,0 +1,125 @@ +diff -ru zsh-4.3.9-orig/Functions/Prompts/prompt_bigfade_setup zsh-4.3.9/Functions/Prompts/prompt_bigfade_setup +--- zsh-4.3.9-orig/Functions/Prompts/prompt_bigfade_setup 2008-07-14 10:04:18.000000000 -0400 ++++ zsh-4.3.9/Functions/Prompts/prompt_bigfade_setup 2008-12-18 20:32:59.000000000 -0500 +@@ -7,7 +7,7 @@ + cat < [ [ []]]] ++ prompt bigfade [8bit] [ [ [ []]]] + + where the parameters are the colors for the fade-bar, user@host text, + date text, and current working directory respectively. The default +@@ -27,9 +27,12 @@ + local date=${3:-'white'} + local cwd=${4:-'yellow'} + ++ if [[ $1 == '8bit' ]]; then ++ shift + local -A schars + autoload -Uz prompt_special_chars + prompt_special_chars ++ fi + + PS1="%B%F{$fadebar}$schars[333]$schars[262]$schars[261]$schars[260]%B%F{$userhost}%K{$fadebar}%n@%m%b%k%f%F{$fadebar}%K{black}$schars[260]$schars[261]$schars[262]$schars[333]%b%f%k%F{$fadebar}%K{black}$schars[333]$schars[262]$schars[261]$schars[260]%B%F{$date}%K{black} %D{%a %b %d} %D{%I:%M:%S%P}$prompt_newline%B%F{$cwd}%K{black}$PWD>%b%f%k " + PS2="%B%F{$fadebar}$schars[333]$schars[262]$schars[261]$schars[260]%b%F{$fadebar}%K{black}$schars[260]$schars[261]$schars[262]$schars[333]%F{$fadebar}%K{black}$schars[333]$schars[262]$schars[261]$schars[260]%B%F{$fadebar}>%b%f%k " +diff -ru zsh-4.3.9-orig/Functions/Prompts/prompt_elite2_setup zsh-4.3.9/Functions/Prompts/prompt_elite2_setup +--- zsh-4.3.9-orig/Functions/Prompts/prompt_elite2_setup 2008-07-14 10:04:18.000000000 -0400 ++++ zsh-4.3.9/Functions/Prompts/prompt_elite2_setup 2008-12-18 20:33:31.000000000 -0500 +@@ -6,7 +6,7 @@ + cat < []] ++ prompt elite2 [8bit] [ []] + + The default colors are both cyan. This theme works best with a dark + background. +@@ -21,9 +21,12 @@ + local text_col=${1:-'cyan'} + local parens_col=${2:-$text_col} + ++ if [[ $1 == '8bit' ]]; then ++ shift + local -A schars + autoload -Uz prompt_special_chars + prompt_special_chars ++ fi + + local text="%b%F{$text_col}" + local parens="%B%F{$parens_col}" +diff -ru zsh-4.3.9-orig/Functions/Prompts/prompt_elite_setup zsh-4.3.9/Functions/Prompts/prompt_elite_setup +--- zsh-4.3.9-orig/Functions/Prompts/prompt_elite_setup 2008-07-14 10:04:18.000000000 -0400 ++++ zsh-4.3.9/Functions/Prompts/prompt_elite_setup 2008-12-18 20:33:45.000000000 -0500 +@@ -6,7 +6,7 @@ + cat < []] ++ prompt elite [8bit] [ []] + + The default colors are red and blue respectively. This theme is + intended for use with a black background. +@@ -21,9 +21,12 @@ + local text=${1:-'red'} + local punctuation=${2:-'blue'} + ++ if [[ $1 == '8bit' ]]; then ++ shift + local -A schars + autoload -Uz prompt_special_chars + prompt_special_chars ++ fi + + PS1="%F{$text}$schars[332]$schars[304]%F{$punctuation}(%F{$text}%n%F{$punctuation}@%F{$text}%m%F{$punctuation})%F{$text}-%F{$punctuation}(%F{$text}%D{%I:%M%P}%F{$punctuation}-:-%F{$text}%D{%m}%F{$punctuation}%F{$text}/%D{%d}%F{$punctuation})%F{$text}$schars[304]-%F{$punctuation}$schars[371]%F{$text}-$schars[371]$schars[371]%F{$punctuation}$schars[372]$prompt_newline%F{$text}$schars[300]$schars[304]%F{$punctuation}(%F{$text}%1~%F{$punctuation})%F{$text}$schars[304]$schars[371]%F{$punctuation}$schars[372]%f" + PS2="> " +diff -ru zsh-4.3.9-orig/Functions/Prompts/prompt_fade_setup zsh-4.3.9/Functions/Prompts/prompt_fade_setup +--- zsh-4.3.9-orig/Functions/Prompts/prompt_fade_setup 2008-07-14 10:04:18.000000000 -0400 ++++ zsh-4.3.9/Functions/Prompts/prompt_fade_setup 2008-12-18 20:33:55.000000000 -0500 +@@ -7,7 +7,7 @@ + cat < [ []]] ++ prompt fade [8bit] [ [ []]] + + where the parameters are the colors for the fade-bar and current + working directory, user@host text, and date text respectively. The +@@ -27,9 +27,12 @@ + local userhost=${2:-'white'} + local date=${3:-'white'} + ++ if [[ $1 == '8bit' ]]; then ++ shift + local -A schars + autoload -Uz prompt_special_chars + prompt_special_chars ++ fi + + PS1="%F{$fadebar_cwd}%B%K{$fadebar_cwd}$schars[333]$schars[262]$schars[261]$schars[260]%F{$userhost}%K{$fadebar_cwd}%B%n@%m%b%F{$fadebar_cwd}%K{black}$schars[333]$schars[262]$schars[261]$schars[260]%F{$date}%K{black}%B %D{%a %b %d} %D{%I:%M:%S%P} $prompt_newline%F{fadebar_cwd}%K{black}%B%~/%b%k%f " + PS2="%F{$fadebar_cwd}%K{black}$schars[333]$schars[262]$schars[261]$schars[260]%f%k>" +diff -ru zsh-4.3.9-orig/Functions/Prompts/prompt_fire_setup zsh-4.3.9/Functions/Prompts/prompt_fire_setup +--- zsh-4.3.9-orig/Functions/Prompts/prompt_fire_setup 2008-07-14 10:04:18.000000000 -0400 ++++ zsh-4.3.9/Functions/Prompts/prompt_fire_setup 2008-12-18 20:34:04.000000000 -0500 +@@ -8,7 +8,7 @@ + cat < [ [ [ [ []]]]]] ++ prompt fire [8bit] [ [ [ [ [ []]]]]] + + where the parameters are the three fire colors, and the colors for the + user@host text, date text, and current working directory respectively. +@@ -29,9 +29,12 @@ + local date=${5:-'white'} + local cwd=${6:-'yellow'} + ++ if [[ $1 == '8bit' ]]; then ++ shift + local -a schars + autoload -Uz prompt_special_chars + prompt_special_chars ++ fi + + local GRAD1="%{$schars[333]$schars[262]$schars[261]$schars[260]%}" + local GRAD2="%{$schars[260]$schars[261]$schars[262]$schars[333]%}" diff --git a/SOURCES/zsh-5.0.2.texi-itemx.patch b/SOURCES/zsh-5.0.2.texi-itemx.patch new file mode 100644 index 0000000..0fed3bc --- /dev/null +++ b/SOURCES/zsh-5.0.2.texi-itemx.patch @@ -0,0 +1,14 @@ +diff -ru zsh-5.0.2-orig/Doc/zsh.texi zsh-5.0.2/Doc/zsh.texi +--- zsh-5.0.2-orig/Doc/zsh.texi 2012-12-21 14:33:06.000000000 -0500 ++++ zsh-5.0.2/Doc/zsh.texi 2013-04-15 18:34:36.660096321 -0400 +@@ -22643,8 +22643,7 @@ + described above. + + @findex _pick_variant +-@item @t{_pick_variant} [ @t{-b} @var{builtin-label} ] [ @t{-c} +-@var{command} ] [ @t{-r} @var{name} ] ++@item @t{_pick_variant} [ @t{-b} @var{builtin-label} ] [ @t{-c} @var{command} ] [ @t{-r} @var{name} ] + @itemx @var{label}@t{=}@var{pattern} ... @var{label} [ @var{args} ... ] + This function is used to resolve situations where a single command name + requires more than one type of handling, either because it +Only in zsh-5.0.2/Doc: zsh.texi~ diff --git a/SOURCES/zsh-serial.patch b/SOURCES/zsh-serial.patch new file mode 100644 index 0000000..541781c --- /dev/null +++ b/SOURCES/zsh-serial.patch @@ -0,0 +1,65 @@ +--- zsh-4.0.4/Src/builtin.c.open Tue Oct 16 02:49:17 2001 ++++ zsh-4.0.4/Src/builtin.c Wed May 15 11:55:32 2002 +@@ -3489,7 +3489,7 @@ bin_read(char *name, char **args, char * + if (!zleactive) { + if (SHTTY == -1) { + /* need to open /dev/tty specially */ +- if ((SHTTY = open("/dev/tty", O_RDWR|O_NOCTTY)) != -1) { ++ if ((SHTTY = block_open("/dev/tty", O_RDWR|O_NOCTTY)) != -1) { + haso = 1; + oshout = shout; + init_shout(); +--- zsh-4.0.4/Src/init.c.open Wed Oct 24 04:16:32 2001 ++++ zsh-4.0.4/Src/init.c Wed May 15 12:00:07 2002 +@@ -397,7 +397,7 @@ init_io(void) + if (isatty(0)) { + zsfree(ttystrname); + if ((ttystrname = ztrdup(ttyname(0)))) { +- SHTTY = movefd(open(ttystrname, O_RDWR | O_NOCTTY)); ++ SHTTY = movefd(block_open(ttystrname, O_RDWR | O_NOCTTY)); + #ifdef TIOCNXCL + /* + * See if the terminal claims to be busy. If so, and fd 0 +@@ -438,7 +438,7 @@ init_io(void) + ttystrname = ztrdup(ttyname(1)); + } + if (SHTTY == -1 && +- (SHTTY = movefd(open("/dev/tty", O_RDWR | O_NOCTTY))) != -1) { ++ (SHTTY = movefd(block_open("/dev/tty", O_RDWR | O_NOCTTY))) != -1) { + zsfree(ttystrname); + ttystrname = ztrdup(ttyname(SHTTY)); + } +@@ -1235,3 +1235,33 @@ zsh_main(int argc, char **argv) + : "use 'logout' to logout.", NULL, 0); + } + } ++ ++/**/ ++int ++block_open (const char *tty, int flags) ++{ ++ int saved_errno; ++ int fd; ++ ++ if ((flags & O_NONBLOCK) == 0) { ++ fd = open (tty, flags | O_NONBLOCK); ++ if (fd == -1) ++ return fd; ++ flags = fcntl(fd, F_GETFL); ++ if (flags == -1) ++ goto bad; ++ flags &= ~O_NONBLOCK; ++ if (fcntl(fd, F_SETFL, flags) == -1) ++ goto bad; ++ } ++ else ++ fd = open (tty, flags); ++ ++ return fd; ++ ++bad: ++ saved_errno = errno; ++ close (fd); ++ errno = saved_errno; ++ return -1; ++} diff --git a/SOURCES/zsh-test-C02-dev_fd-mock.patch b/SOURCES/zsh-test-C02-dev_fd-mock.patch new file mode 100644 index 0000000..7e3447e --- /dev/null +++ b/SOURCES/zsh-test-C02-dev_fd-mock.patch @@ -0,0 +1,23 @@ +diff -ru zsh-4.3.6-orig/Test/C02cond.ztst zsh-4.3.6/Test/C02cond.ztst +--- zsh-4.3.6-orig/Test/C02cond.ztst 2008-02-27 06:41:13.000000000 -0500 ++++ zsh-4.3.6/Test/C02cond.ztst 2008-08-25 17:39:13.000000000 -0400 +@@ -180,7 +180,8 @@ + print -u$ZTST_fd "Warning: not testing [[ -e /dev/fd/0 ]] (/dev/fd not supported)" + true + else +- [[ -e /dev/fd/0 ]] ++ print -u$ZTST_fd "Warning: not testing: [[ -e /dev/fd/0 ]] (mock kills us)" ++ true + fi + 0dD:/dev/fd support in conds handled by access + +@@ -188,7 +189,8 @@ + print -u$ZTST_fd "Warning: not testing [[ -O /dev/fd/0 ]] (/dev/fd not supported)" + true + else +- [[ -O /dev/fd/0 ]] ++ print -u$ZTST_fd "Warning: not testing: [[ -O /dev/fd/0 ]] (mock kills us)" ++ true + fi + 0dD:/dev/fd support in conds handled by stat + diff --git a/SOURCES/zshenv.rhs b/SOURCES/zshenv.rhs new file mode 100644 index 0000000..30630c0 --- /dev/null +++ b/SOURCES/zshenv.rhs @@ -0,0 +1,9 @@ +# +# /etc/zshenv is sourced on all invocations of the +# shell, unless the -f option is set. It should +# contain commands to set the command search path, +# plus other important environment variables. +# .zshenv should not contain commands that produce +# output or assume the shell is attached to a tty. +# + diff --git a/SOURCES/zshprompt.pl b/SOURCES/zshprompt.pl new file mode 100644 index 0000000..b9d5f0f --- /dev/null +++ b/SOURCES/zshprompt.pl @@ -0,0 +1,235 @@ +#!/usr/bin/perl -w + +#requires Gtk-Perl + +use Gtk; +use strict; + +set_locale Gtk; +init Gtk; + +my $window = new Gtk::Window("toplevel"); +$window->signal_connect( "delete_event", \&CloseAppWindow ); +my $table = new Gtk::Table( 20, 6, 0 ); +$window->border_width( 5 ); +#$window->add( $button ); + + +my $prompt = new Gtk::Entry( 128); +my $log = new Gtk::Text(); +$log->set_usize(40,60); +$log->show(); +$prompt->show(); +#$prompt->set_editable (1); +$prompt->set_text(""); +$table->attach( $prompt,0,4,0,4,[ 'expand', 'shrink', 'fill' ], + 'shrink', + 0, 0 ); + +$table->set_row_spacings( 5 ); +$table->set_col_spacings( 5 ); + +my $currDir = new Gtk::Button( "Current Directory" ); +$currDir->show(); +$table->attach_defaults( $currDir,0,1,4,6 ); + +my $errorCode = new Gtk::Button( "Last Return Code" ); +$errorCode->show(); +$table->attach_defaults( $errorCode,1,2,4,6 ); + +my $currTime = new Gtk::Button( "Time" ); +$currTime->show(); +$table->attach_defaults( $currTime,2,3,4,6 ); + +my $hist = new Gtk::Button( "History Number" ); +$hist->show(); +$table->attach_defaults( $hist,3,4,4,6 ); + +my $host = new Gtk::Button( "Hostname" ); +$host->show(); +$table->attach_defaults( $host,0,1,6,8 ); + + + +my $backgroundBlue = new Gtk::Button( "Blue Background" ); +$backgroundBlue->show(); +$table->attach_defaults( $backgroundBlue,0,1,8,10 ); + +my $backgroundRed = new Gtk::Button( "Red Background" ); +$backgroundRed->show(); +$table->attach_defaults( $backgroundRed,1,2,8,10 ); + +my $backgroundGreen = new Gtk::Button( "Green Background" ); +$backgroundGreen->show(); +$table->attach_defaults( $backgroundGreen,2,3,8,10 ); + +my $backgroundYellow = new Gtk::Button( "Yellow Background" ); +$backgroundYellow->show(); +$table->attach_defaults( $backgroundYellow,3,4,8,10 ); + +my $backgroundBlack = new Gtk::Button( "Black Background" ); +$backgroundBlack->show(); +$table->attach_defaults( $backgroundBlack,5,6,8,10 ); + +my $backgroundWhite = new Gtk::Button( "White Background" ); +$backgroundWhite->show(); +$table->attach_defaults( $backgroundWhite,6,7,8,10 ); + +my $backgroundPink = new Gtk::Button( "Pink Background" ); +$backgroundPink->show(); +$table->attach_defaults( $backgroundPink,7,8,8,10 ); + + + + + +my $textBlue = new Gtk::Button( "Blue Text" ); +$textBlue->show(); +$table->attach_defaults( $textBlue,0,1,10,12 ); + +my $textRed = new Gtk::Button( "Red Text" ); +$textRed->show(); +$table->attach_defaults( $textRed,1,2,10,12 ); + +my $textGreen = new Gtk::Button( "Green Text" ); +$textGreen->show(); +$table->attach_defaults( $textGreen,2,3,10,12 ); + +my $textYellow = new Gtk::Button( "Yellow Text" ); +$textYellow->show(); +$table->attach_defaults( $textYellow,3,4,10,12 ); + +my $textBlack = new Gtk::Button( "Black Text" ); +$textBlack->show(); +$table->attach_defaults( $textBlack,5,6,10,12 ); + +my $textWhite = new Gtk::Button( "White Text" ); +$textWhite->show(); +$table->attach_defaults( $textWhite,6,7,10,12 ); + +my $textPink = new Gtk::Button( "Pink Text" ); +$textPink->show(); +$table->attach_defaults( $textPink,7,8,10,12 ); + + +my $textDefault = new Gtk::Button( "Default Text" ); +$textDefault->show(); +$table->attach_defaults( $textDefault,0,1,12,14 ); + +my $backgroundDefault = new Gtk::Button( "Default Background" ); +$backgroundDefault->show(); +$table->attach_defaults( $backgroundDefault,1,2,12,14 ); + + + +my $set = new Gtk::Button( "Save Settings" ); +$set->show(); +$table->attach_defaults( $set,0,1,16,18 ); + +my $xterm = new Gtk::Button( "Test saved settings" ); +$xterm->show(); +$table->attach_defaults( $xterm,1,2,16,18 ); + +$table->attach_defaults( $log,0,6,18,20 ); + + +$currDir->signal_connect( "clicked", \&insertButtonText, "%1/" ); +$errorCode->signal_connect( "clicked", \&insertButtonText, "%?" ); +$currTime->signal_connect( "clicked", \&insertButtonText, "%T" ); +$hist->signal_connect( "clicked", \&insertButtonText, "%!" ); +$host->signal_connect( "clicked", \&insertButtonText, "%m" ); + +$backgroundBlue->signal_connect( "clicked", \&insertButtonText, "%{\$bg[blue]%}" ); +$backgroundRed->signal_connect( "clicked", \&insertButtonText, "%{\$bg[red]%}" ); +$backgroundGreen->signal_connect( "clicked", \&insertButtonText, "%{\$bg[green]%}" ); +$backgroundYellow->signal_connect( "clicked", \&insertButtonText, "%{\$bg[yellow]%}" ); +$backgroundBlack->signal_connect( "clicked", \&insertButtonText, "%{\$bg[black]%}" ); +$backgroundWhite->signal_connect( "clicked", \&insertButtonText, "%{\$bg[white]%}" ); +$backgroundPink->signal_connect( "clicked", \&insertButtonText, "%{\$bg[magenta]%}" ); +$backgroundDefault->signal_connect( "clicked", \&insertButtonText, "%{\$bg[default]%}" ); + + + + +$textBlue->signal_connect( "clicked", \&insertButtonText, "%{\$fg[blue]%}" ); +$textRed->signal_connect( "clicked", \&insertButtonText, "%{\$fg[red]%}" ); +$textGreen->signal_connect( "clicked", \&insertButtonText, "%{\$fg[green]%}" ); +$textYellow->signal_connect( "clicked", \&insertButtonText, "%{\$fg[yellow]%}" ); +$textBlack->signal_connect( "clicked", \&insertButtonText, "%{\$fg[black]%}" ); +$textWhite->signal_connect( "clicked", \&insertButtonText, "%{\$fg[white]%}" ); +$textPink->signal_connect( "clicked", \&insertButtonText, "%{\$fg[magenta]%}" ); +$textDefault->signal_connect( "clicked", \&insertButtonText, "%{\$fg[default]%}" ); + + + + + +$set->signal_connect( "clicked", \&pushEnv ); +$xterm->signal_connect( "clicked", \&xterm ); + +sub xterm +{ +my $string="xterm -e zsh -li&"; +#$string.=$prompt->get_text(); + +#$string.="' zsh -li\"& "; + +system($string); +# $prompt->append_text( $string ); +$log->insert( "", "white", "black", "executing:\n $string\n"); +} + + +sub pushEnv +{ +chdir("~"); +use Env qw(PS1); +my $pNotSet=0; +open(PROMPT, "+<", ".prompt") or $pNotSet=1; + + +if($pNotSet) +{ + #$prompt->insert( "", "white", "black", "prompt is not set"); + open(ZSHRC, '>>','.zshrc') or die "cannot open zshrc"; + print ZSHRC ". ~/.prompt\n"; + close (ZSHRC); +} +close (PROMPT); +open(PROMPT, ">", ".prompt"); +print PROMPT "export PS1=\"",$prompt->get_text(),"\"\n"; + +#$prompt->insert( "", "white", "black", $PS1); + +close(PROMPT); +close(ZSHRC); +$prompt->grab_focus(); + +} +$prompt->can_default(1); +$prompt->grab_default(); +$table->show(); +$window->add( $table ); + + + + +$window->show(); +$prompt->grab_focus(); +main Gtk; + +exit( 0 ); + +sub CloseAppWindow +{ + Gtk->exit( 0 ); + return 0; +} + + +sub insertButtonText +{ + my ($widget, $txt) = @_; + $prompt->append_text( $txt ); +$prompt->grab_focus(); +} diff --git a/SOURCES/zshrc.rhs b/SOURCES/zshrc.rhs new file mode 100644 index 0000000..5b3b92a --- /dev/null +++ b/SOURCES/zshrc.rhs @@ -0,0 +1,50 @@ +# +# /etc/zshrc is sourced in interactive shells. It +# should contain commands to set up aliases, functions, +# options, key bindings, etc. +# + +## shell functions +#setenv() { export $1=$2 } # csh compatibility + +# Set prompts +PROMPT='[%n@%m]%~%# ' # default prompt +#RPROMPT=' %~' # prompt for right side of screen + +# bindkey -v # vi key bindings +# bindkey -e # emacs key bindings +bindkey ' ' magic-space # also do history expansion on space + +# Provide pathmunge for /etc/profile.d scripts +pathmunge() +{ + if ! echo $PATH | /bin/grep -qE "(^|:)$1($|:)" ; then + if [ "$2" = "after" ] ; then + PATH=$PATH:$1 + else + PATH=$1:$PATH + fi + fi +} + +_src_etc_profile_d() +{ + # Make the *.sh things happier, and have possible ~/.zshenv options like + # NOMATCH ignored. + emulate -L ksh + + + # from bashrc, with zsh fixes + if [[ ! -o login ]]; then # We're not a login shell + for i in /etc/profile.d/*.sh; do + if [ -r "$i" ]; then + . $i + fi + done + unset i + fi +} +_src_etc_profile_d + +unset -f pathmunge _src_etc_profile_d + diff --git a/SPECS/zsh.spec b/SPECS/zsh.spec new file mode 100644 index 0000000..7816153 --- /dev/null +++ b/SPECS/zsh.spec @@ -0,0 +1,245 @@ +# this file is encoded in UTF-8 -*- coding: utf-8 -*- + +Summary: Powerful interactive shell +Name: zsh +Version: 5.0.2 +Release: 3%{?dist} +License: MIT +URL: http://zsh.sourceforge.net/ +Group: System Environment/Shells +Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2 +Source1: zlogin.rhs +Source2: zlogout.rhs +Source3: zprofile.rhs +Source4: zshrc.rhs +Source5: zshenv.rhs +Source6: dotzshrc +Source7: zshprompt.pl +# Give me better tools or die! +%global _default_patch_fuzz 2 +Patch0: zsh-serial.patch +Patch4: zsh-4.3.6-8bit-prompts.patch +Patch5: zsh-test-C02-dev_fd-mock.patch +# Tmp. +Patch11: zsh-5.0.2.texi-itemx.patch +BuildRequires: coreutils sed ncurses-devel libcap-devel +BuildRequires: texinfo tetex texi2html gawk /bin/hostname +Requires(post): /sbin/install-info grep +Requires(preun): /sbin/install-info +Requires(postun): coreutils grep + +%description +The zsh shell is a command interpreter usable as an interactive login +shell and as a shell script command processor. Zsh resembles the ksh +shell (the Korn shell), but includes many enhancements. Zsh supports +command line editing, built-in spelling correction, programmable +command completion, shell functions (with autoloading), a history +mechanism, and more. + +%package html +Summary: Zsh shell manual in html format +Group: System Environment/Shells + +%description html +The zsh shell is a command interpreter usable as an interactive login +shell and as a shell script command processor. Zsh resembles the ksh +shell (the Korn shell), but includes many enhancements. Zsh supports +command line editing, built-in spelling correction, programmable +command completion, shell functions (with autoloading), a history +mechanism, and more. + +This package contains the Zsh manual in html format. + +%prep + +%setup -q +%patch0 -p1 -b .serial +%patch4 -p1 +%patch5 -p1 + +%patch11 -p1 + +cp -p %SOURCE7 . + +%build +%define _bindir /bin +# Avoid stripping... +export LDFLAGS="" +%configure --enable-etcdir=%{_sysconfdir} --with-tcsetpgrp --enable-maildir-support + +make all html + +%check +# Run the testsuite +# the completion tests hang on s390 and s390x + ( cd Test + mkdir skipped +%ifarch s390 s390x ppc ppc64 + mv Y*.ztst skipped +%endif +%ifarch s390 s390x ppc64 + # FIXME: This is a real failure, Debian apparently just don't test. + # RHBZ: 460043 + mv D02glob.ztst skipped +%endif + # FIXME: This hangs in mock + # Running test: Test loading of all compiled modules + mv V01zmodload.ztst skipped + true ) + ZTST_verbose=1 make test + +%install +rm -rf $RPM_BUILD_ROOT +%makeinstall install.info \ + fndir=$RPM_BUILD_ROOT%{_datadir}/zsh/%{version}/functions \ + sitefndir=$RPM_BUILD_ROOT%{_datadir}/zsh/site-functions \ + scriptdir=$RPM_BUILD_ROOT%{_datadir}/zsh/%{version}/scripts \ + sitescriptdir=$RPM_BUILD_ROOT%{_datadir}/zsh/scripts + +rm -f ${RPM_BUILD_ROOT}%{_bindir}/zsh-%{version} +rm -f $RPM_BUILD_ROOT%{_infodir}/dir + +mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir} +for i in %{SOURCE4} %{SOURCE1} %{SOURCE2} %{SOURCE5} %{SOURCE3}; do + install -m 644 $i ${RPM_BUILD_ROOT}%{_sysconfdir}/"$(basename $i .rhs)" +done + +mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/skel +install -m 644 %{SOURCE6} ${RPM_BUILD_ROOT}%{_sysconfdir}/skel/.zshrc + +# This is just here to shut up rpmlint, and is very annoying. +# Note that we can't chmod everything as then rpmlint will complain about +# those without a she-bang line. +for i in checkmail harden run-help zcalc zkbd; do + sed -i -e 's!/usr/local/bin/zsh!%{_bindir}/zsh!' \ + ${RPM_BUILD_ROOT}%{_datadir}/zsh/*/functions/$i + chmod +x ${RPM_BUILD_ROOT}%{_datadir}/zsh/*/functions/$i +done + + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +if [ ! -f %{_sysconfdir}/shells ] ; then + echo "%{_bindir}/zsh" > %{_sysconfdir}/shells +else + grep -q "^%{_bindir}/zsh$" %{_sysconfdir}/shells || echo "%{_bindir}/zsh" >> %{_sysconfdir}/shells +fi + +if [ -f %{_infodir}/zsh.info.gz ]; then +# This is needed so that --excludedocs works. +/sbin/install-info %{_infodir}/zsh.info.gz %{_infodir}/dir \ + --entry="* zsh: (zsh). An enhanced bourne shell." +fi + +: + +%preun +if [ "$1" = 0 ] ; then + if [ -f %{_infodir}/zsh.info.gz ]; then + # This is needed so that --excludedocs works. + /sbin/install-info --delete %{_infodir}/zsh.info.gz %{_infodir}/dir \ + --entry="* zsh: (zsh). An enhanced bourne shell." + fi +fi +: + +%postun +if [ "$1" = 0 ] ; then + if [ -f %{_sysconfdir}/shells ] ; then + TmpFile=`%{_bindir}/mktemp /tmp/.zshrpmXXXXXX` + grep -v '^%{_bindir}/zsh$' %{_sysconfdir}/shells > $TmpFile + cp -f $TmpFile %{_sysconfdir}/shells + rm -f $TmpFile + fi +fi + +%files +%defattr(-,root,root) +%doc README LICENCE Etc/BUGS Etc/CONTRIBUTORS Etc/FAQ FEATURES MACHINES +%doc NEWS Etc/zsh-development-guide Etc/completion-style-guide zshprompt.pl +%attr(755,root,root) %{_bindir}/zsh +%{_mandir}/*/* +%{_infodir}/* +%{_datadir}/zsh +%{_libdir}/zsh +%config(noreplace) %{_sysconfdir}/skel/.z* +%config(noreplace) %{_sysconfdir}/z* + +%files html +%defattr(-,root,root) +%doc Doc/*.html + +%changelog +* Mon Apr 15 2013 James Antill - 5.0.2-3 +- Fix the changelog dates. +- Fix the texi itemx bug. +- Resolves: bug#927863 + +* Fri Feb 15 2013 Fedora Release Engineering - 5.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Jan 08 2013 Dominic Hopf - 5.0.2-1 +- Update to new upstream version: Zsh 5.0.2 + +* Wed Nov 21 2012 Dominic Hopf - 5.0.0-1 +- Update to new upstream version: Zsh 5.0.0 + +* Sun Jul 22 2012 Fedora Release Engineering - 4.3.17-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sun Mar 04 2012 Dominic Hopf - 4.3.17-1 +- Update to new upstream version: Zsh 4.3.17 + +* Sat Jan 14 2012 Fedora Release Engineering - 4.3.15-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Sat Dec 24 2011 Dominic Hopf - 4.3.15-1 +- Update to new upstream version: Zsh 4.3.15 + +* Sat Dec 17 2011 Dominic Hopf - 4.3.14-2 +- change the License field to MIT (RHBZ#768548) + +* Sat Dec 10 2011 Dominic Hopf - 4.3.14-1 +- Update to new upstream version: Zsh 4.3.14 + +* Sat Dec 03 2011 Dominic Hopf - 4.3.13-1 +- Update to new upstream version: Zsh 4.3.13 + +* Sat Aug 13 2011 Dominic Hopf - 4.3.12-1 +- Update to new upstream version: Zsh 4.3.12 + +* Tue Feb 08 2011 Fedora Release Engineering - 4.3.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Jan 20 2011 Christopher Ailon - 4.3.11-1 +- Rebase to upstream version 4.3.11 + +* Tue Dec 7 2010 Toshio Kuratomi - 4.3.10-6 +- Rebuild for FTBFS https://bugzilla.redhat.com/show_bug.cgi?id=631197 +- Remove deprecated PreReq, the packages aren't needed at runtime and they're + already in Requires(post,preun,etc): lines. + +* Mon Mar 22 2010 James Antill - 4.3.10-5 +- Add pathmunge to our /etc/zshrc, for profile.d compat. +- Resolves: bug#548960 + +* Fri Aug 7 2009 James Antill - 4.3.10-4 +- Allow --excludedocs command to work! +- Resolves: bug#515986 + +* Mon Jul 27 2009 Fedora Release Engineering - 4.3.10-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Jul 20 2009 James Antill - 4.3.10-1 +- Import new upstream 4.3.10 + +* Wed Jun 10 2009 Karsten Hopp 4.3.9-4.1 +- skip D02glob test on s390, too + +* Mon Mar 2 2009 James Antill - 4.3.9-4 +- Remove D02glob testcase on ppc/ppc64, and hope noone cares + +* Wed Feb 25 2009 Fedora Release Engineering - 4.3.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild