Path: csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Grisha Levit Newsgroups: gnu.bash.bug Subject: EOF not disabled in readline Date: Fri, 24 Jul 2020 01:32:21 -0400 Lines: 25 Approved: bug-bash@gnu.org Message-ID: References: NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: usenet.stanford.edu 1595568757 3825 209.51.188.17 (24 Jul 2020 05:32:37 GMT) X-Complaints-To: action@cs.stanford.edu To: bug-bash Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=+eQFOimDTqoslL21k2G+hzdykXWT1wggLfa6heS6t3s=; b=RanOEI6VV5+3+1fow4UJ6aroFSzk00Q0O0azTO/rQr4sBa3Am/7aaAF2GF18B5adj4 UbHUDWVzBQhdZauHC4RzD3ABNpPbU0W2Gjtj5lhxc6xoNqS38uhX9eeHWdDUFulznuWW Mb1Q+/k3kfoBwzeR7akHCrIkytqK8SVobN1A7ZwxLSqhar1rlih9Ag0GRYQ5YliIDEcg tUDUqwgfZjV1jotO5csqlnzXeWHKMP9trG8LqVvck3jKijQtJL7ftrsel5uHIkuFTO9w xIWKXL6qeIvtbQMfMW+kVGBBmWS917ngLRAbiCQDG1yDqm73TEzps6XvaVjHy0UKaf72 sCcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=+eQFOimDTqoslL21k2G+hzdykXWT1wggLfa6heS6t3s=; b=oNAorbJTFFtTC2uAnECC4SMXPr/3RLzfYGNzWe/rRLtDWX0pepeR6jpotSIkC5GmpS fPHym8p1M5sNnxdwmZ2QCoS3Nton2hTlppKhPDws6X5DSZXsCIjLqPCpMq9bSO4pDDJ0 C+romFYv3V17G1vW0BnTi11giX7I0SJpjIOs0croqM75H5OBCg316ku0ZAaspAtruG+X EIacMEzWkUSQCcJn4HFrVBY3bTPmPQd6H4ZYlZXOoDqjq5bGoOlz9NMnliXvPGNVQzUm S1xQ5QZpnO/+StWf9enZt7zSQmQeRftm5zD3KqYDuNx/SkejF0Yx2tLtlz0yr6TsF4ci wXTQ== X-Gm-Message-State: AOAM533iDv6Tf7eccETob3o+YjX851zZpYdxv4lDXI0RnUy+c1RebYYc fYrwV5+UFWaeQHukBK2CdB68PnXYrqnNzGRU6bXhTizM1V0= X-Google-Smtp-Source: ABdhPJy1ZZHk7J7OABTCqe/RRFTXTgMKEyW/YXusOtKJtNxkIKxS/46rpAEAit6qA5KJqTPhVsq//cGghNw3C16C+F8= X-Received: by 2002:ad4:57b2:: with SMTP id g18mr8121596qvx.207.1595568752059; Thu, 23 Jul 2020 22:32:32 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::f30; envelope-from=grishalevit@gmail.com; helo=mail-qv1-xf30.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: Xref: csiph.com gnu.bash.bug:16611 It seems that disabling the EOF character does not have an effect on readline. For example: $ stty sane $ stty eof undef $ ^D Use "logout" to leave the shell. $ read -e; echo $? ^D 1 But the setting did take effect, as can be verified by running, e.g. `read' w/o readline: $ read -n1; echo ${REPLY@Q} ^D$'\004' Setting the EOF character to anything else works as expected but, when followed by an `stty eof undef', readline keeps using whatever the value that had previously been set. My goal was to bind a custom function to ^D and, as a workaround, setting EOF to some nearly-impossible to type character works fine but I'm not sure if the inability to disable EOF is expected.