aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Shelton <stuart@shelton.me>2017-01-20 15:25:49 +0000
committerStuart Shelton <stuart@shelton.me>2017-01-20 15:25:49 +0000
commitdbc67c747b1f6faa161939e3563cd28731fa0bdf (patch)
tree1847bdc389e72dfc9a8c8c4ca424b8cf0a7056f5 /app-shells
parentUpdate dev-lang/python-2.7.12 (diff)
downloadsrcshelton-dbc67c747b1f6faa161939e3563cd28731fa0bdf.tar.gz
srcshelton-dbc67c747b1f6faa161939e3563cd28731fa0bdf.tar.bz2
srcshelton-dbc67c747b1f6faa161939e3563cd28731fa0bdf.zip
Update prefix ebuilds with upstream changes
Diffstat (limited to 'app-shells')
-rw-r--r--app-shells/bash/Manifest5
-rw-r--r--app-shells/bash/bash-4.3_p39.ebuild2
-rw-r--r--app-shells/bash/files/bash-4.3_p39-cygwin-r2.patch690
-rw-r--r--app-shells/bash/files/bashrc-prefix.patch.old40
-rw-r--r--app-shells/bash/files/bashrc.old111
5 files changed, 694 insertions, 154 deletions
diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest
index 5a5428ff..5c89cd99 100644
--- a/app-shells/bash/Manifest
+++ b/app-shells/bash/Manifest
@@ -18,12 +18,11 @@ AUX bash-4.3-mapfile-improper-array-name-validation.patch 407 SHA256 0302e96630a
AUX bash-4.3-prompt-string-comsub.patch 3395 SHA256 33eeb827efffcac9362359b49c6552aeba56b53760c332ab038cd6c1fdd678d5 SHA512 1da0ca9fa9c9c9331c848342194f2c0b0ad590daa162d78d994f6ab79991c926c832ee71fad9550acf7099067b6b40e60169227ebca56cf450b95627b842929b WHIRLPOOL 3681415ea4c57b8a13fe25ce637b61a14ccaf2c1a8d5081b47baa29d2ae0f36a2d1b9dc58ff7ec5ba5b7c59dac38bace989e76f8dfa2d35d209df7e8916002ac
AUX bash-4.3-protos.patch 174 SHA256 729aded4f907f4bad466785eed850b2b25a145e9ed75f0fc690190d5fccd387a SHA512 4af0540467bbcf7cf041de6fe6ed080b149a2ff309e5dbe5e7b76bb30459aaeead813be678384feb01a7b64d3a649372f8a8aaf686f69ac7958baa87b25340b0 WHIRLPOOL b1a5def9952b1f8ec4b9c3ff9df09672b2ad55a67a99890bc0796c87e23c1ec86c0eed50125d790120b6eea595f5aeabf981383323aac43b2f790587ec70685a
AUX bash-4.3-signal.h.patch 210 SHA256 3301f5849483135d93ec5e5f9e8256e094cf17762c5dab91167f253b1a23871e SHA512 9f8756740c35434c8150f97d91ef65109def9c80bc3f0c251f7561af49a504b240395ae8a8517ffcabce599c3203b5e23effbc6bd008cd1d9f80a4cdaf638284 WHIRLPOOL 329c3fc0fbf535bb7cdfe3ac60a418734c9aa03b8ce89fb065fbdd24c6a1aae33a4156e870fbe1272df9581a166c219d93c10c74db2c319985bc8e78b89778ec
+AUX bash-4.3_p39-cygwin-r2.patch 23396 SHA256 8e1225119d8fa3b5260550471b471098e5002378db4c4d89e2d18b8dc4707309 SHA512 9e03d9a3d877f8fec616fa5849e23554af23a2f973c98382f61d79e64c099c2843021c7bab8c43cd3c1bcd81f7f0d22a06ef095f2fb2dabbf5868b9178f4bac8 WHIRLPOOL 900ea0cd35a12498bc605d0c08cc229207cb1435b337aa851c4e1adeeba21f64545cb8faf5e7bab1fc4746ca83a06d38271e1fdb45f07a31c2aab14079d9b310
AUX bash-4.4-popd-offset-overflow.patch 1069 SHA256 7531362393ebf012e5e153ba7fcf631d93574d7e80d21596607a5f5d3845c00a SHA512 535f61b2e0c6423031520700be423750e9177ec96055be781aee5dbdd01c720c1dbc30fffa73b88464527981193c1c6a74ec4139753ef4f40a5bb0f55c4de61c WHIRLPOOL 3fd7d95b7a806d5f8f82ab683c0bcf13bb0fc8bf5b5fe374689abbaae3c325994b4709c601d1ac6cdb1a2e5d6a049c98ab46688e5ecb2a18c98ac182fa6c91f7
AUX bash_logout 205 SHA256 15aaded954389c05d7de5d36c4887db61975ad52c87ad78baf1062ec8997289d SHA512 7234250c03fc920996a381f9daef9e2d8ab1e1a29acdebed6669d8e0fe1c872a7fa343adf7d9ddc81225b0cd9eb223ba7ad1ff42448aff057fc6d6baa8f04a7d WHIRLPOOL 16242c8796af44f550f2935b37c770c022754c63db75b57fbe49d1a313b8651235619ead571cd70ae37f890c694d1c6b2e4871ec51345743eff8649782d0523b
AUX bashrc 3637 SHA256 cd1e64f5b48348e1960fe68fd7dc3716cd12a9ae3a9dd24cb75ccb17cd8300c4 SHA512 bac4c6ba06441e50f1303bbb9549aded2af72731fc0d1f935ec716104e0442e36f9afe28fe29c86f159d0cdfe9f1ba7dc2f42cee4265a1869e879853f531ea06 WHIRLPOOL 970741fa3438bc75d0fca1d9449b3afc51e087420de745b64073d6f1844dc73d6c0c2ad6b2575000fd3d0a7f5d6f9b9e834287ec8c4de79ebdea5b644ba82c0f
AUX bashrc-prefix.patch 1313 SHA256 f21fd0476c51848c724a43e98c998b1d0f8b459426ebb157525211a284f4b516 SHA512 151aacbe2e3c6bbf42b6a219938829cd5fd635584dddcf7d712dc50fd93bad46344333aa9b21f22ec1b0d1143e42e66cf6b87d823523a4bc29f36d7402d2c1e8 WHIRLPOOL 2faf4824f46ca588ebacb6f1c7eff5ab3621a0c391abeacc35183ba842d9dbc6f0a1b6e19ea2f473152784bd13a83a024a756d8c1d683ff9e3b33158ce77675b
-AUX bashrc-prefix.patch.old 1502 SHA256 004ae7a51b0fc73d79658a707af0889b9fadaf41e0181ae4e24e2e0e504ff0d0 SHA512 f09f7f587709fc8624141c2d4576a150787bd27fbc64c12126cdb1d4f346ef4d5ab5c2a6c3f16ed4ece385a9f9e0341066563ac6d027bb08d005dce2c523d2f7 WHIRLPOOL 1ed21b8bc78811423354cdcbefd7538d4e2060e89a88044b54f8aebd3c491c6119ea7039587853399136f02ee50946be329e95f19aff84c36e1c12399b3fd378
-AUX bashrc.old 3754 SHA256 5427e3e082ec835e859d9469cf8fe9e2e4b11c1dfce877b9d6a681451c14c507 SHA512 cb30d5b3771d2aeed476102033d6d6348ec7e77e7d6ad6778417e29a662e00c130d338b781cfcf7a747d437757ca8629645d1dff92116bb0709152f9cc30829d WHIRLPOOL a28aaacf65d744b1f880f7e3fa9c270551af863fc979ffddd88d76309102f03b7a484b2589ab4f7db3a0d4ec40449d7d0e55dd915d9fc8376ed940ab9cceae15
AUX dot-bash_logout 127 SHA256 3bcb4958dad662fc2cbe77177236679f7a09b8bdb0be738102df4457394f4022 SHA512 e0248b5087656a4dd3a4790ed8e6101866b922ccab36b510b3bf408dc0c583e70f323fbad0392e4ea6ca5dcbe73568733e0c0aa9c8ce6b00ff5f72bf3e9fd8fd WHIRLPOOL 3dc6bc364f8229d123873940743866dfc330e193ab6ec7c5162c61d0ecc319198a64f27176521bfb979c31eed9ed0b2ee2ffce31b050d4cb8e3aa8a5c12c38cf
AUX dot-bash_profile 193 SHA256 ae12206aaa35dc96273ed421f4e85ca26a1707455e3cc9f054c7f5e2e9c53df6 SHA512 064227bb7658f5ac0aaddd7ddda39daa0ffa924601445afa61c02aa19a990a5def377b125111e4817bf80ed80d33e1c111ee13034958b5de1ff8e50c093359a2 WHIRLPOOL cde8efc527122adbfa90d60a79fbdffd953c5573c5c6c5d499e56093517ceb7b48d9cfadd10b7c1d161b6d7f84276403fc233fca2d6798bcff2d0d052023672b
AUX dot-bashrc 551 SHA256 e280e34af6e830c93adb6285f66ead4812ddfb2bbc6a7ff618467f4c933f6446 SHA512 518b62aa2fa30e7d1692847929a6ce8dae4eac93e8b16d223d1ae86f4d5b076bcbe1852c9034f321c013e17502db9f771979957c67f8e8a71ca4eea7bfe9cc1b WHIRLPOOL 27c53e3f59bd89d5517b5b22bcf04a9adddee0492c52d34d26a707062fb4c4fa853cdf2726d6ec2621a08f24c32a53651ce5693b6de1be764de3e088eb9f7ee6
@@ -131,7 +130,7 @@ DIST bash43-046 1494 SHA256 b3b456a6b690cd293353f17e22d92a202b3c8bce587ae5f2667c
DIST bash43-047 4437 SHA256 c69248de7e78ba6b92f118fe1ef47bc86479d5040fe0b1f908ace1c9e3c67c4a SHA512 9332d680ac226491cf8e5986a3261eb76b53ef4b0b2a43405564b088afc0e8658077812c9177bdab7900e05394e69f3047d82ddb59553fc01ef721acfa9d5553 WHIRLPOOL 719fa31d0fb09a75d5abbb63ee5a485802c5eadd06720d6074c2282d117aa6e234f5f75cabd340643710bd14e99260047183386bd1df278c9715aed7b98232d7
DIST bash43-048 1612 SHA256 5b8215451c5d096ca1e115307ffe6613553551a70369525a0778f216c3a4dfa2 SHA512 7c3963bfbc730b4592668460e86c166e727e9897c1a9235a6860a01bc90d365ef0707f0fac7ed62780dcc84e80dbe8484ec59e9e948def22f44ae03e8a169780 WHIRLPOOL e1a435c3b9fbc0deca80dd89bfd3adcbff1d5a3af50884d2aef54635b8ba1063903e2d99a5a23bd1c64c19c5e9c19de6b479ac777cecdb812555dc5683b8cf71
EBUILD bash-4.2_p53.ebuild 11013 SHA256 ab43d7db50a6d41399d29081efe5269ada83a5f2a34adf546590643d0add51cc SHA512 047767ba750354d9c5e257ffa7e37eaf91c48c89cecda29a1a159d578dea96c8be8eeda9ff2b0908d78dea35ca1d44cc9881eaebe8a98f20bf2dff0e79ec821c WHIRLPOOL 47f2c6bde7a6c6239a8827a86854f86e7c71ffa3471861f1f12174e434b93c53167aab9fd653e5c0eb34ced8cef6eae0a2d4a5b86ca3f3b6906d5fe6d1b35f16
-EBUILD bash-4.3_p39.ebuild 10390 SHA256 825d7af0b121083e66007446d310643e74cc1baa2be34c0f4ea31aefaea828eb SHA512 03bbed2348fb3767dbdf0f273571a99d5914cda0f3d58dd0add4b66ce76b2a4f768155613601b708f3d99e6a6cf27c7b3af75870179efb62ac3f5d1891af0b66 WHIRLPOOL 178676460bc95e91d9fe22822cbedb3af9709e3babbbb4b8b9fed592c678242c2a6d1a36ae06c2d9dfce9579aa5c22b42984040e697b7b14ee8bfc2a29b5090f
+EBUILD bash-4.3_p39.ebuild 10434 SHA256 2f426204a2210341f3a48eb2a603b20ea7ae383d0cf3b5f0a8aaa76ee79afa4e SHA512 89a8c0f7e4ccd4e359ffa9e5bfb13b8cc737244159bea9995e46cdc96ad07920d505e76da6cbc52a658d88cfdf94302e1466dd8009ad2ad0ba2614a4a4a7a0b9 WHIRLPOOL 5f6e29d4e76b095c3d60e1363312117966fcb98606f74c46176301695375425bdb12e88e050ad2aded730218bebb57177129cc01b61ef55d88af9c24a9980040
EBUILD bash-4.3_p42-r1.ebuild 10068 SHA256 627fd5ae117fbc9e0a9ec69be92834b09b5c1e1f1ea1fa605902941ce1b81f0b SHA512 ae3e1779ef94f1eade86977f432b049bcca4e69509757dbaba727e0b3a3bc93104108aee0ed0348b53d7b746fbde1e411c6f8a7860a5f80584d6c9901d654ae0 WHIRLPOOL 17569fd57432956464e07eda2bfc6093bff52461e251822774cae8df010325b4451a6b5fdb56f2819fea90b63fe1bc8ecfc666c3e8feba0ea6d1c8aa4b6c4738
EBUILD bash-4.3_p42.ebuild 10070 SHA256 4e142cac5475f25af5439c441ed172036eb5a0d607b89147b6dce823e72256ee SHA512 97aadcb7934fc1cfab18a6b3d849db411ec96b17cdc363f2525a4cb049dd3beaa326c441cdaebd72b90baf6b76d5d9ab4dc6a948916a4adf7fa4ccd5330126b4 WHIRLPOOL 53a92baa0a16f4705c43945133af72bbe576dd7c8204e0c3fedca0e60333b8a48d53c4efd23f02a5360801c347c112d3fd35a9586d3d266f97e4526aa5e2d9dc
EBUILD bash-4.3_p46-r1.ebuild 10088 SHA256 77216bab3206d7a596b7e986e6d3023d9e5e12e06da230f3ebc7a5b9482a42f0 SHA512 f22a2987fcf73470e5525587702cecfa0453fee053a78f766f0a180a2430379ada90a63e24faf4466d19881fbed0c1c5151f8b50288308cf6b83b22d602c0d76 WHIRLPOOL 39ea01edc32023171c9c2254e747c055a675011c2b847655a422ca2332bb5cf85fc5e572d6c80592bd565fc8b4a2fc4a469adebe1d5cb72936174ca5386d6389
diff --git a/app-shells/bash/bash-4.3_p39.ebuild b/app-shells/bash/bash-4.3_p39.ebuild
index 1dcafe8b..3fe19e3b 100644
--- a/app-shells/bash/bash-4.3_p39.ebuild
+++ b/app-shells/bash/bash-4.3_p39.ebuild
@@ -96,6 +96,8 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-4.0-bashintl-in-siglist.patch
+ epatch "${FILESDIR}"/${P}-cygwin-r2.patch
+
# Include appropriate headers, to satisfy clang and avoid -Wimplicit-function-declaration
epatch "${FILESDIR}"/${PN}-4.2-signal.h.patch
epatch "${FILESDIR}"/${PN}-4.3-signal.h.patch
diff --git a/app-shells/bash/files/bash-4.3_p39-cygwin-r2.patch b/app-shells/bash/files/bash-4.3_p39-cygwin-r2.patch
new file mode 100644
index 00000000..1a0ffc36
--- /dev/null
+++ b/app-shells/bash/files/bash-4.3_p39-cygwin-r2.patch
@@ -0,0 +1,690 @@
+based on Cygwin bash-4.3.39-2.src package
+
+--- origsrc/bash-4.3/bashline.c 2015-06-01 22:41:57.804475900 -0600
++++ src/bash-4.3/bashline.c 2015-06-02 22:22:59.745114200 -0600
+@@ -264,6 +274,11 @@ int no_empty_command_completion;
+ are the only possible matches, even if FIGNORE says to. */
+ int force_fignore = 1;
+
++#if __CYGWIN__
++/* If set, shorten "foo.exe" to "foo" when they are the same file. */
++int completion_strip_exe;
++#endif /* __CYGWIN__ */
++
+ /* Perform spelling correction on directory names during word completion */
+ int dircomplete_spelling = 0;
+
+@@ -2109,6 +2127,21 @@ globword:
+
+ if (match && executable_completion ((searching_path ? val : cval), searching_path))
+ {
++#if __CYGWIN__
++ if (completion_strip_exe)
++ {
++ size_t val_len = strlen (val);
++ char *candidate;
++ if (val_len > 4 && !strcasecmp (&val[val_len - 4], ".exe")
++ && (candidate = strdup (val)))
++ {
++ candidate[val_len - 4] = '\0';
++ if (same_file (val, candidate, NULL, NULL))
++ temp[strlen (temp) - 4] = '\0';
++ free (candidate);
++ }
++ }
++#endif
+ if (cval != val)
+ free (cval);
+ free (val);
+@@ -2844,6 +2877,17 @@ test_for_directory (name)
+ int r;
+
+ fn = bash_tilde_expand (name, 0);
++#if __CYGWIN__
++ /* stat("//server") can only be successful as a directory, but takes
++ a several-second timeout to fail. It is much faster to assume
++ that //server is a valid name than it is to wait for the stat,
++ even though it gives false positives on bad names. */
++ if (fn[0] == '/' && fn[1] == '/' && ! strchr (&fn[2], '/'))
++ {
++ free (fn);
++ return 1;
++ }
++#endif /* __CYGWIN__ */
+ r = file_isdir (fn);
+ free (fn);
+
+--- origsrc/bash-4.3/builtins/set.def 2015-06-01 22:41:57.850941500 -0600
++++ src/bash-4.3/builtins/set.def 2015-06-02 22:22:59.760951100 -0600
+@@ -56,6 +56,13 @@ extern int dont_save_function_defs;
+ #if defined (READLINE)
+ extern int no_line_editing;
+ #endif /* READLINE */
++#if __CYGWIN__
++extern int igncr;
++static int set_minus_o_option_maybe (int, const char *, int);
++# define INTERACTIVE_ONLY ,1
++#else /* ! __CYGWIN__ */
++# define INTERACTIVE_ONLY
++#endif
+
+ $BUILTIN set
+ $FUNCTION set_builtin
+@@ -92,6 +99,9 @@ Options:
+ #if defined (HISTORY)
+ history enable command history
+ #endif
++#if __CYGWIN__
++ igncr on cygwin, ignore \r in line endings
++#endif
+ ignoreeof the shell will not exit upon reading EOF
+ interactive-comments
+ allow comments to appear in interactive commands
+@@ -188,29 +198,41 @@ const struct {
+ int *variable;
+ setopt_set_func_t *set_func;
+ setopt_get_func_t *get_func;
++#if __CYGWIN__
++ /* Cygwin users have taken to exporting SHELLOPTS for the
++ cygwin-specific igncr. As a result, we need to make sure
++ SHELLOPTS parsing does not turn on interactive options when
++ exported from an interactive shell, but parsed in a
++ non-interactive setting, since some interactive options violate
++ POSIX /bin/sh rules. */
++ int interactive_only;
++#endif /* __CYGWIN__ */
+ } o_options[] = {
+ { "allexport", 'a', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ #if defined (BRACE_EXPANSION)
+ { "braceexpand",'B', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ #endif
+ #if defined (READLINE)
+- { "emacs", '\0', (int *)NULL, set_edit_mode, get_edit_mode },
++ { "emacs", '\0', (int *)NULL, set_edit_mode, get_edit_mode INTERACTIVE_ONLY},
+ #endif
+ { "errexit", 'e', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ { "errtrace", 'E', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ { "functrace", 'T', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ { "hashall", 'h', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ #if defined (BANG_HISTORY)
+- { "histexpand", 'H', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
++ { "histexpand", 'H', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL INTERACTIVE_ONLY},
+ #endif /* BANG_HISTORY */
+ #if defined (HISTORY)
+- { "history", '\0', &enable_history_list, bash_set_history, (setopt_get_func_t *)NULL },
++ { "history", '\0', &enable_history_list, bash_set_history, (setopt_get_func_t *)NULL INTERACTIVE_ONLY},
++#endif
++#if __CYGWIN__
++ { "igncr", '\0', &igncr, NULL, (setopt_get_func_t *)NULL },
+ #endif
+ { "ignoreeof", '\0', &ignoreeof, set_ignoreeof, (setopt_get_func_t *)NULL },
+ { "interactive-comments", '\0', &interactive_comments, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ { "keyword", 'k', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ #if defined (JOB_CONTROL)
+- { "monitor", 'm', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
++ { "monitor", 'm', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL INTERACTIVE_ONLY},
+ #endif
+ { "noclobber", 'C', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ { "noexec", 'n', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+@@ -229,7 +251,7 @@ const struct {
+ { "privileged", 'p', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ { "verbose", 'v', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ #if defined (READLINE)
+- { "vi", '\0', (int *)NULL, set_edit_mode, get_edit_mode },
++ { "vi", '\0', (int *)NULL, set_edit_mode, get_edit_mode INTERACTIVE_ONLY},
+ #endif
+ { "xtrace", 'x', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ {(char *)NULL, 0 , (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+@@ -416,6 +438,15 @@ int
+ set_minus_o_option (on_or_off, option_name)
+ int on_or_off;
+ char *option_name;
++#if __CYGWIN__
++{
++ /* See cygwin comments above. */
++ return set_minus_o_option_maybe (on_or_off, option_name, 0);
++}
++static int
++set_minus_o_option_maybe (int on_or_off, const char *option_name,
++ int avoid_interactive)
++#endif /* __CYGWIN__ */
+ {
+ register int i;
+
+@@ -423,6 +454,10 @@ set_minus_o_option (on_or_off, option_na
+ {
+ if (STREQ (option_name, o_options[i].name))
+ {
++#if __CYGWIN__
++ if (o_options[i].interactive_only && avoid_interactive)
++ return EXECUTION_SUCCESS;
++#endif /* __CYGWIN__ */
+ if (o_options[i].letter == 0)
+ {
+ SET_BINARY_O_OPTION_VALUE (i, on_or_off, option_name);
+@@ -548,7 +583,11 @@ parse_shellopts (value)
+ vptr = 0;
+ while (vname = extract_colon_unit (value, &vptr))
+ {
++#if __CYGWIN__
++ set_minus_o_option_maybe (FLAG_ON, vname, !interactive_shell);
++#else /* !__CYGWIN__ */
+ set_minus_o_option (FLAG_ON, vname);
++#endif
+ free (vname);
+ }
+ }
+--- origsrc/bash-4.3/builtins/shopt.def 2013-02-27 07:43:20.000000000 -0700
++++ src/bash-4.3/builtins/shopt.def 2015-06-02 22:22:59.760951100 -0600
+@@ -91,6 +91,11 @@ extern int glob_star;
+ extern int glob_asciirange;
+ extern int lastpipe_opt;
+
++#if __CYGWIN__
++extern int completion_strip_exe;
++#endif
++
++
+ #if defined (EXTENDED_GLOB)
+ extern int extended_glob;
+ #endif
+@@ -161,6 +166,9 @@ static struct {
+ { "compat40", &shopt_compat40, set_compatibility_level },
+ { "compat41", &shopt_compat41, set_compatibility_level },
+ { "compat42", &shopt_compat42, set_compatibility_level },
++#if __CYGWIN__
++ { "completion_strip_exe", &completion_strip_exe, NULL },
++#endif
+ #if defined (READLINE)
+ { "complete_fullquote", &complete_fullquote, (shopt_set_func_t *)NULL},
+ { "direxpand", &dircomplete_expand, shopt_set_complete_direxpand },
+--- origsrc/bash-4.3/doc/bash.1 2014-02-06 07:03:52.000000000 -0700
++++ src/bash-4.3/doc/bash.1 2015-06-02 22:22:59.760951100 -0600
+@@ -1658,6 +1658,14 @@ subsequently reset.
+ Expands to the effective user ID of the current user, initialized at
+ shell startup. This variable is readonly.
+ .TP
++.B EXECIGNORE
++A colon-separated list of extended glob (see \fBPattern Matching\fP)
++patterns. Files with full paths matching one of these patterns are
++not considered executable for the purposes of completion and PATH
++searching, but the \fB[\fP, \fB[[\fP, and \fBtest\fP builtins are not
++affected. Use this variable to deal with systems that set the
++executable bit on files that are not actually executable.
++.TP
+ .B FUNCNAME
+ An array variable containing the names of all shell functions
+ currently in the execution call stack.
+@@ -3308,6 +3316,10 @@ the character
+ .B ``.''
+ at the start of a name or immediately following a slash
+ must be matched explicitly, unless the shell option
++.B completion_strip_exe
++If set, whenever bash sees `foo.exe' during completion, it checks if
++`foo' is the same file and strips the suffix.
++.TP 8
+ .B dotglob
+ is set.
+ When matching a pathname, the slash character must always be
+--- origsrc/bash-4.3/doc/bashref.texi 2014-02-22 11:20:36.000000000 -0700
++++ src/bash-4.3/doc/bashref.texi 2015-06-02 22:22:59.776306300 -0600
+@@ -4992,6 +4992,10 @@ filenames.
+ This variable is set by default, which is the default Bash behavior in
+ versions through 4.2.
+
++@item completion_strip_exe
++If set, whenever bash sees `foo.exe' during completion, it checks if
++`foo' is the same file and strips the suffix.
++
+ @item direxpand
+ If set, Bash
+ replaces directory names with the results of word expansion when performing
+@@ -5578,6 +5582,14 @@ Similar to @code{BASH_ENV}; used when th
+ The numeric effective user id of the current user. This variable
+ is readonly.
+
++@item EXECIGNORE
++A colon-separated list of extended glob ((@pxref{Pattern Matching})
++patterns. Files with full paths matching one of these patterns are
++not considered executable for the purposes of completion and PATH
++searching, but the @code{[}, @code{[[}, and @code{test} builtins are
++not affected. Use this variable to deal with systems that set the
++executable bit on files that are not actually executable.
++
+ @item FCEDIT
+ The editor used as a default by the @option{-e} option to the @code{fc}
+ builtin command.
+--- origsrc/bash-4.3/execute_cmd.c 2015-06-01 22:41:57.242554200 -0600
++++ src/bash-4.3/execute_cmd.c 2015-06-02 22:22:59.776306300 -0600
+@@ -58,6 +58,7 @@ extern int errno;
+ #endif
+
+ #define NEED_FPURGE_DECL
++#define NEED_SH_SETLINEBUF_DECL /* used in externs.h */
+
+ #include "bashansi.h"
+ #include "bashintl.h"
+--- origsrc/bash-4.3/expr.c 2014-01-03 06:55:00.000000000 -0700
++++ src/bash-4.3/expr.c 2015-06-02 22:22:59.776306300 -0600
+@@ -83,6 +83,7 @@
+
+ #include "shell.h"
+ #include "typemax.h" /* INTMAX_MAX, INTMAX_MIN */
++#define exp2 exp2_
+
+ /* Because of the $((...)) construct, expressions may include newlines.
+ Here is a macro which accepts newlines, tabs and spaces as whitespace. */
+--- origsrc/bash-4.3/findcmd.c 2012-10-15 05:45:04.000000000 -0600
++++ src/bash-4.3/findcmd.c 2015-06-02 22:22:59.776306300 -0600
+@@ -48,6 +48,8 @@
+ extern int errno;
+ #endif
+
++#include <glob/strmatch.h>
++
+ extern int posixly_correct;
+ extern int last_command_exit_value;
+
+@@ -77,6 +79,38 @@ int check_hashed_filenames;
+ containing the file of interest. */
+ int dot_found_in_search = 0;
+
++static struct ignorevar execignore =
++{
++ "EXECIGNORE",
++ (struct ign *)0,
++ 0,
++ (char *)0,
++ (sh_iv_item_func_t *)0,
++};
++
++void
++setup_exec_ignore (char *varname)
++{
++ setup_ignore_patterns (&execignore);
++}
++
++/* Return whether we should never consider file executable
++ * even if the system tells us it is. */
++static int
++is_on_exec_blacklist (char *name)
++{
++ struct ign *p;
++ int flags = FNM_EXTMATCH | FNM_CASEFOLD;
++
++ for (p = execignore.ignores; p && p->val; p++)
++ {
++ if (strmatch (p->val, (char *)name, flags) != FNM_NOMATCH)
++ return (1);
++ }
++
++ return (0);
++}
++
+ /* Return some flags based on information about this file.
+ The EXISTS bit is non-zero if the file is found.
+ The EXECABLE bit is non-zero the file is executble.
+@@ -104,7 +138,7 @@ file_status (name)
+ file access mechanisms into account. eaccess uses the effective
+ user and group IDs, not the real ones. We could use sh_eaccess,
+ but we don't want any special treatment for /dev/fd. */
+- if (eaccess (name, X_OK) == 0)
++ if (!is_on_exec_blacklist (name) && eaccess (name, X_OK) == 0)
+ r |= FS_EXECABLE;
+ if (eaccess (name, R_OK) == 0)
+ r |= FS_READABLE;
+--- origsrc/bash-4.3/findcmd.h 2012-01-14 16:56:25.000000000 -0700
++++ src/bash-4.3/findcmd.h 2015-06-02 22:22:59.776306300 -0600
+@@ -31,5 +31,6 @@ extern char *find_user_command __P((cons
+ extern char *find_path_file __P((const char *));
+ extern char *search_for_command __P((const char *, int));
+ extern char *user_command_matches __P((const char *, int, int));
++extern void setup_exec_ignore __P((char *));
+
+ #endif /* _FINDCMD_H_ */
+--- origsrc/bash-4.3/general.c 2014-01-30 14:46:15.000000000 -0700
++++ src/bash-4.3/general.c 2015-06-02 22:22:59.791899800 -0600
+@@ -44,6 +44,10 @@
+
+ #include <tilde/tilde.h>
+
++#ifdef __CYGWIN__
++# include <sys/cygwin.h>
++#endif
++
+ #if !defined (errno)
+ extern int errno;
+ #endif /* !errno */
+@@ -632,7 +636,8 @@ make_absolute (string, dot_path)
+ {
+ char pathbuf[PATH_MAX + 1];
+
+- cygwin_conv_to_full_posix_path (string, pathbuf);
++ cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_ABSOLUTE, string, pathbuf,
++ sizeof pathbuf);
+ result = savestring (pathbuf);
+ }
+ #else
+--- origsrc/bash-4.3/include/posixjmp.h 2012-12-23 20:20:50.000000000 -0700
++++ src/bash-4.3/include/posixjmp.h 2015-06-02 22:22:59.791899800 -0600
+@@ -27,13 +27,15 @@
+
+ #if defined (HAVE_POSIX_SIGSETJMP)
+ # define procenv_t sigjmp_buf
+-# if !defined (__OPENNT)
++# if !defined (__OPENNT) && !defined __CYGWIN__
+ # undef setjmp
+ # define setjmp(x) sigsetjmp((x), 1)
+-# define setjmp_nosigs(x) sigsetjmp((x), 0)
+ # undef longjmp
+ # define longjmp(x, n) siglongjmp((x), (n))
+-# endif /* !__OPENNT */
++# endif /* !__OPENNT && !__CYGWIN__ */
++# if !defined (__OPENNT)
++# define setjmp_nosigs(x) sigsetjmp((x), 0)
++# endif /* !__OPENNT */
+ #else
+ # define procenv_t jmp_buf
+ # define setjmp_nosigs setjmp
+--- origsrc/bash-4.3/input.c 2014-02-07 07:13:08.000000000 -0700
++++ src/bash-4.3/input.c 2015-06-02 22:22:59.791899800 -0600
+@@ -44,6 +44,10 @@
+ #include "quit.h"
+ #include "trap.h"
+
++#if __CYGWIN__
++int igncr;
++#endif
++
+ #if !defined (errno)
+ extern int errno;
+ #endif /* !errno */
+@@ -561,6 +565,19 @@ buffered_getchar ()
+ {
+ CHECK_TERMSIG;
+
++#if __CYGWIN__
++ /* shopt igncr means to discard carriage returns from input stream.
++ If cr is the only character in the buffer, then recurse to pick
++ up the next character; otherwise flatten the buffer. */
++ if (igncr)
++ {
++ int ch;
++ while ((ch = bufstream_getc (buffers[bash_input.location.buffered_fd]))
++ == '\r')
++ ;
++ return ch;
++ }
++#endif /* __CYGWIN__ */
+ #if !defined (DJGPP)
+ return (bufstream_getc (buffers[bash_input.location.buffered_fd]));
+ #else
+--- origsrc/bash-4.3/lib/sh/pathphys.c 2013-05-28 13:33:58.000000000 -0600
++++ src/bash-4.3/lib/sh/pathphys.c 2015-06-02 22:22:59.823097800 -0600
+@@ -35,6 +35,7 @@
+ #include <stdio.h>
+ #include <chartypes.h>
+ #include <errno.h>
++#include <stdlib.h>
+
+ #include "shell.h"
+
+@@ -76,6 +77,10 @@ sh_physpath (path, flags)
+ char *path;
+ int flags;
+ {
++#if __CYGWIN__
++ /* realpath does this correctly without all the hassle */
++ return realpath (path, NULL);
++#else
+ char tbuf[PATH_MAX+1], linkbuf[PATH_MAX+1];
+ char *result, *p, *q, *qsave, *qbase, *workpath;
+ int double_slash_path, linklen, nlink;
+@@ -214,11 +219,7 @@ error:
+ {
+ q = result;
+ /* Duplicating some code here... */
+-#if defined (__CYGWIN__)
+- qbase = (ISALPHA((unsigned char)workpath[0]) && workpath[1] == ':') ? workpath + 3 : workpath + 1;
+-#else
+ qbase = workpath + 1;
+-#endif
+ double_slash_path = DOUBLE_SLASH (workpath);
+ qbase += double_slash_path;
+
+@@ -249,6 +250,7 @@ error:
+ }
+
+ return (result);
++#endif /* ! __CYGWIN__ */
+ }
+
+ char *
+--- origsrc/bash-4.3/lib/sh/tmpfile.c 2013-12-18 15:50:13.000000000 -0700
++++ src/bash-4.3/lib/sh/tmpfile.c 2015-06-02 22:22:59.823097800 -0600
+@@ -96,7 +96,7 @@ get_tmpdir (flags)
+ if (tdir && (file_iswdir (tdir) == 0 || strlen (tdir) > PATH_MAX))
+ tdir = 0;
+
+- if (tdir == 0)
++ if (tdir == 0 || !file_iswdir (tdir))
+ tdir = get_sys_tmpdir ();
+
+ #if defined (HAVE_PATHCONF) && defined (_PC_NAME_MAX)
+@@ -118,14 +118,15 @@ sh_mktmpname (nameroot, flags)
+ struct stat sb;
+ int r, tdlen;
+
+- filename = (char *)xmalloc (PATH_MAX + 1);
++ filename = NULL;
+ tdir = get_tmpdir (flags);
+ tdlen = strlen (tdir);
+
+ lroot = nameroot ? nameroot : DEFAULT_NAMEROOT;
+
+ #ifdef USE_MKTEMP
+- sprintf (filename, "%s/%s.XXXXXX", tdir, lroot);
++ if (asprintf (&filename, "%s/%s.XXXXXX", tdir, lroot) < 0)
++ return NULL;
+ if (mktemp (filename) == 0)
+ {
+ free (filename);
+@@ -138,7 +139,9 @@ sh_mktmpname (nameroot, flags)
+ (unsigned long) time ((time_t *)0) ^
+ (unsigned long) dollar_dollar_pid ^
+ (unsigned long) ((flags & MT_USERANDOM) ? random () : ntmpfiles++);
+- sprintf (filename, "%s/%s-%lu", tdir, lroot, filenum);
++ free (filename);
++ if (asprintf (&filename, "%s/%s-%lu", tdir, lroot, filenum) < 0)
++ return NULL;
+ if (tmpnamelen > 0 && tmpnamelen < 32)
+ filename[tdlen + 1 + tmpnamelen] = '\0';
+ # ifdef HAVE_LSTAT
+@@ -163,14 +166,19 @@ sh_mktmpfd (nameroot, flags, namep)
+ char *filename, *tdir, *lroot;
+ int fd, tdlen;
+
+- filename = (char *)xmalloc (PATH_MAX + 1);
++ filename = NULL;
+ tdir = get_tmpdir (flags);
+ tdlen = strlen (tdir);
+
+ lroot = nameroot ? nameroot : DEFAULT_NAMEROOT;
+
+ #ifdef USE_MKSTEMP
+- sprintf (filename, "%s/%s.XXXXXX", tdir, lroot);
++ if (asprintf (&filename, "%s/%s.XXXXXX", tdir, lroot) < 0)
++ {
++ if (namep)
++ *namep = NULL;
++ return -1;
++ }
+ fd = mkstemp (filename);
+ if (fd < 0 || namep == 0)
+ {
+@@ -187,7 +195,13 @@ sh_mktmpfd (nameroot, flags, namep)
+ (unsigned long) time ((time_t *)0) ^
+ (unsigned long) dollar_dollar_pid ^
+ (unsigned long) ((flags & MT_USERANDOM) ? random () : ntmpfiles++);
+- sprintf (filename, "%s/%s-%lu", tdir, lroot, filenum);
++ free (filename);
++ if (asprintf (&filename, "%s/%s-%lu", tdir, lroot, filenum) < 0)
++ {
++ if (namep)
++ *namep = NULL;
++ return -1;
++ }
+ if (tmpnamelen > 0 && tmpnamelen < 32)
+ filename[tdlen + 1 + tmpnamelen] = '\0';
+ fd = open (filename, BASEOPENFLAGS | ((flags & MT_READWRITE) ? O_RDWR : O_WRONLY), 0600);
+--- origsrc/bash-4.3/parse.y 2015-06-01 22:41:58.022560000 -0600
++++ src/bash-4.3/parse.y 2015-06-02 22:22:59.838697600 -0600
+@@ -1531,14 +1531,20 @@ yy_string_get ()
+ string = bash_input.location.string;
+
+ /* If the string doesn't exist, or is empty, EOF found. */
+- if (string && *string)
++ while (string && *string)
+ {
+ c = *string++;
+ bash_input.location.string = string;
++#if __CYGWIN__
++ {
++ extern int igncr;
++ if (igncr && c == '\r')
++ continue;
++ }
++#endif
+ return (c);
+ }
+- else
+- return (EOF);
++ return (EOF);
+ }
+
+ static int
+@@ -2305,7 +2311,7 @@ shell_getc (remove_quoted_newline)
+ if (n <= 2) /* we have to save 1 for the newline added below */
+ {
+ if (truncating == 0)
+- internal_warning("shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%llu): line truncated", shell_input_line_size, SIZE_MAX);
++ internal_warning("shell_getc: shell_input_line_size (%zu) exceeds SIZE_MAX (%zu): line truncated", shell_input_line_size, SIZE_MAX);
+ shell_input_line[i] = '\0';
+ truncating = 1;
+ }
+@@ -3587,7 +3593,6 @@ parse_comsub (qc, open, close, lenp, fla
+
+ while (count)
+ {
+-comsub_readchar:
+ ch = shell_getc (qc != '\'' && (tflags & (LEX_INCOMMENT|LEX_PASSNEXT)) == 0);
+
+ if (ch == EOF)
+--- origsrc/bash-4.3/pathexp.h 2009-01-04 12:32:40.000000000 -0700
++++ src/bash-4.3/pathexp.h 2015-06-02 22:22:59.838697600 -0600
+@@ -86,7 +86,7 @@ struct ign {
+ typedef int sh_iv_item_func_t __P((struct ign *));
+
+ struct ignorevar {
+- char *varname; /* FIGNORE or GLOBIGNORE */
++ char *varname; /* FIGNORE or GLOBIGNORE or EXECIGNORE */
+ struct ign *ignores; /* Store the ignore strings here */
+ int num_ignores; /* How many are there? */
+ char *last_ignoreval; /* Last value of variable - cached for speed */
+--- origsrc/bash-4.3/subst.c 2015-06-01 22:41:57.367407300 -0600
++++ src/bash-4.3/subst.c 2015-06-02 22:22:59.838697600 -0600
+@@ -41,6 +41,7 @@
+ #include "posixstat.h"
+ #include "bashintl.h"
+
++#define NEED_SH_SETLINEBUF_DECL /* used in externs.h */
+ #include "shell.h"
+ #include "parser.h"
+ #include "flags.h"
+@@ -5268,6 +5269,13 @@ read_comsub (fd, quoted, rflag)
+ #endif
+ continue;
+ }
++#if __CYGWIN__
++ {
++ extern int igncr;
++ if (igncr && c == '\r')
++ continue;
++ }
++#endif /* __CYGWIN__ */
+
+ /* Add the character to ISTRING, possibly after resizing it. */
+ RESIZE_MALLOCED_BUFFER (istring, istring_index, 2, istring_size, DEFAULT_ARRAY_SIZE);
+@@ -5385,6 +5393,28 @@ command_substitute (string, quoted)
+ goto error_exit;
+ }
+
++#if __CYGWIN__
++ /* Passing a pipe through std fds can cause hangs when talking to a
++ non-cygwin child. Move it. */
++ if (fildes[0] < 3)
++ {
++ int fd = fcntl (fildes[0], F_DUPFD, 3);
++ close (fildes[0]);
++ fildes[0] = fd;
++ }
++ if (fildes[1] < 3)
++ {
++ int fd = fcntl (fildes[1], F_DUPFD, 3);
++ close (fildes[1]);
++ fildes[1] = fd;
++ }
++ if (fildes[0] < 0 || fildes[1] < 0)
++ {
++ sys_error (_("cannot make pipe for command substitution"));
++ goto error_exit;
++ }
++#endif /* __CYGWIN__ */
++
+ old_pid = last_made_pid;
+ #if defined (JOB_CONTROL)
+ old_pipeline_pgrp = pipeline_pgrp;
+--- origsrc/bash-4.3/variables.c 2015-06-01 22:41:57.928984100 -0600
++++ src/bash-4.3/variables.c 2015-06-02 22:22:59.854339600 -0600
+@@ -4681,6 +4681,8 @@ static struct name_and_function special_
+ { "COMP_WORDBREAKS", sv_comp_wordbreaks },
+ #endif
+
++ { "EXECIGNORE", sv_execignore },
++
+ { "FUNCNEST", sv_funcnest },
+
+ { "GLOBIGNORE", sv_globignore },
+@@ -4879,6 +4881,13 @@ sv_globignore (name)
+ setup_glob_ignore (name);
+ }
+
++/* What to do when EXECIGNORE changes. */
++void
++sv_execignore (char *name)
++{
++ setup_exec_ignore (name);
++}
++
+ #if defined (READLINE)
+ void
+ sv_comp_wordbreaks (name)
+@@ -4952,7 +4961,7 @@ sv_winsize (name)
+ /* Update the value of HOME in the export environment so tilde expansion will
+ work on cygwin. */
+ #if defined (__CYGWIN__)
+-sv_home (name)
++void sv_home (name)
+ char *name;
+ {
+ array_needs_making = 1;
+--- origsrc/bash-4.3/variables.h 2014-01-08 13:33:29.000000000 -0700
++++ src/bash-4.3/variables.h 2015-06-02 22:22:59.854339600 -0600
+@@ -372,6 +372,7 @@ extern void sv_ifs __P((char *));
+ extern void sv_path __P((char *));
+ extern void sv_mail __P((char *));
+ extern void sv_funcnest __P((char *));
++extern void sv_execignore __P((char *));
+ extern void sv_globignore __P((char *));
+ extern void sv_ignoreeof __P((char *));
+ extern void sv_strict_posix __P((char *));
diff --git a/app-shells/bash/files/bashrc-prefix.patch.old b/app-shells/bash/files/bashrc-prefix.patch.old
deleted file mode 100644
index 04ebb10f..00000000
--- a/app-shells/bash/files/bashrc-prefix.patch.old
+++ /dev/null
@@ -1,40 +0,0 @@
---- bashrc
-+++ bashrc
-@@ -1,4 +1,4 @@
--# /etc/bash/bashrc
-+# @GENTOO_PORTAGE_EPREFIX@/etc/bash/bashrc
- #
- # This file is sourced by all *interactive* bash shells on startup,
- # including some apparently interactive shells such as scp and rcp
-@@ -48,7 +48,7 @@
- safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM
- match_lhs=""
- [[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
--[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(</etc/DIR_COLORS)"
-+[[ -f "@GENTOO_PORTAGE_EPREFIX@"/etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(<"@GENTOO_PORTAGE_EPREFIX@"/etc/DIR_COLORS)"
- [[ -z ${match_lhs} ]] \
- && type -P dircolors >/dev/null \
- && match_lhs=$(dircolors --print-database)
-@@ -56,15 +56,13 @@
-
- if ${use_color} ; then
- # Enable colors for ls, etc. Prefer ~/.dir_colors #64489
-- if type -P dircolors >/dev/null ; then
-- if [[ -f ~/.dir_colors ]] ; then
-- eval $(dircolors -b ~/.dir_colors)
-- elif [[ -f /etc/DIR_COLORS ]] ; then
-- eval $(dircolors -b /etc/DIR_COLORS)
-- fi
-- fi
--
-- if [[ ${EUID} == 0 ]] ; then
-+ if [[ -f ~/.dir_colors ]] ; then
-+ eval $("@GENTOO_PORTAGE_EPREFIX@"/usr/bin/dircolors -b ~/.dir_colors);
-+ elif [[ -f "@GENTOO_PORTAGE_EPREFIX@"/etc/DIR_COLORS ]] ; then
-+ eval $("@GENTOO_PORTAGE_EPREFIX@"/usr/bin/dircolors -b "@GENTOO_PORTAGE_EPREFIX@"/etc/DIR_COLORS)
-+ fi
-+
-+ if [[ ${EUID} == 0 ]] ; then
- PS1='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
- else
- PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
diff --git a/app-shells/bash/files/bashrc.old b/app-shells/bash/files/bashrc.old
deleted file mode 100644
index aa559429..00000000
--- a/app-shells/bash/files/bashrc.old
+++ /dev/null
@@ -1,111 +0,0 @@
-# /etc/bash/bashrc
-#
-# This file is sourced by all *interactive* bash shells on startup,
-# including some apparently interactive shells such as scp and rcp
-# that can't tolerate any output. So make sure this doesn't display
-# anything or bad things will happen !
-
-
-# Test for an interactive shell. There is no need to set anything
-# past this point for scp and rcp, and it's important to refrain from
-# outputting anything in those cases.
-if [[ $- != *i* ]] ; then
- # Shell is non-interactive. Be done now!
- return
-fi
-
-# Bash won't get SIGWINCH if another process is in the foreground.
-# Enable checkwinsize so that bash will check the terminal size when
-# it regains control. #65623
-# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)
-shopt -s checkwinsize
-
-# Disable completion when the input buffer is empty. i.e. Hitting tab
-# and waiting a long time for bash to expand all of $PATH.
-shopt -s no_empty_cmd_completion
-
-# Enable history appending instead of overwriting when exiting. #139609
-shopt -s histappend
-
-# Save each command to the history file as it's executed. #517342
-# This does mean sessions get interleaved when reading later on, but this
-# way the history is always up to date. History is not synced across live
-# sessions though; that is what `history -n` does.
-# Disabled by default due to concerns related to system recovery when $HOME
-# is under duress, or lives somewhere flaky (like NFS). Constantly syncing
-# the history will halt the shell prompt until it's finished.
-#PROMPT_COMMAND='history -a'
-
-# Change the window title of X terminals
-case ${TERM} in
- xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*)
- #PS1='\[\033]0;\u@\h:\w\007\]'
- PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"'
- ;;
- screen*)
- #PS1='\[\033k\u@\h:\w\033\\\]'
- PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\033\\"'
- ;;
- *)
- #unset PS1
- :
- ;;
-esac
-
-use_color=false
-#BSD#@# BSD doesn't typically come with dircolors so we need
-#BSD#@# to hardcode some terminals in here.
-#BSD#@case ${TERM} in
-#BSD#@ xterm*|rxvt*|Eterm|aterm|kterm|gnome*|screen|cons25) use_color=true;;
-#BSD#@esac
-
-# Set colorful PS1 only on colorful terminals.
-# dircolors --print-database uses its own built-in database
-# instead of using /etc/DIR_COLORS. Try to use the external file
-# first to take advantage of user additions. Use internal bash
-# globbing instead of external grep binary.
-safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM
-match_lhs=""
-[[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
-[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(</etc/DIR_COLORS)"
-[[ -z ${match_lhs} ]] \
- && type -P dircolors >/dev/null \
- && match_lhs=$(dircolors --print-database)
-[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true
-
-if ${use_color} ; then
- # Enable colors for ls, etc. Prefer ~/.dir_colors #64489
- if type -P dircolors >/dev/null ; then
- if [[ -f ~/.dir_colors ]] ; then
- eval $(dircolors -b ~/.dir_colors)
- elif [[ -f /etc/DIR_COLORS ]] ; then
- eval $(dircolors -b /etc/DIR_COLORS)
- fi
- fi
-
- if [[ ${EUID} == 0 ]] ; then
- PS1='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
- else
- PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
- fi
-
- #BSD#@export CLICOLOR=1
- #GNU#@alias ls='ls --color=auto'
- alias grep='grep --colour=auto'
- alias egrep='egrep --colour=auto'
- alias fgrep='fgrep --colour=auto'
-else
- if [[ ${EUID} == 0 ]] ; then
- # show root@ when we don't have colors
- PS1='\u@\h \W \$ '
- else
- PS1='\u@\h \w \$ '
- fi
-fi
-
-for sh in /etc/bash/bashrc.d/* ; do
- [[ -r "${sh}" && -s "${sh}" ]] && source "${sh}"
-done
-
-# Try to keep environment pollution down, EPA loves us.
-unset use_color safe_term match_lhs sh