Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: =?UTF-8?Q?Ville_Skytt=C3=A4?= Newsgroups: gnu.bash.bug Subject: Setting/unsetting posix mode interferes with keybindings Date: Sun, 21 Jun 2020 10:06:52 +0300 Lines: 46 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 1592723229 21972 209.51.188.17 (21 Jun 2020 07:07:09 GMT) X-Complaints-To: action@cs.stanford.edu To: bug-bash@gnu.org Envelope-to: bug-bash@gnu.org 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=VYQYmLlf63FXJFyKyop41JUf1v4yKuKWUMeC3eGuxUQ=; b=kKqg9qSEQ0oaZE8zHcpPSGIVpLt2Or5axrIlshwYS5y6ZlEfJRzMe9TINl//bVuPwv gtChvTiYHrfAKPswE+hm7zZdUjrGte/IbX6jYj6S9rCVz/82QZb4OFu2kdIAzkB+s6Fd cIR/M+hLjYxEST0S+G/6qBXPB91a99WikFsG4P6C6qG7lcOExOc8cN1EJtPGfR5VvfiV Oni3pSknaJ6KhV50F6YRcldAAXWz5xUtMFyNgaXXBL11t2BW1vIqpguy+fJM1TYZvl/u ABB4aOG7M1Us7OLtgrcjsEIiRwgoGM5NqmKbKvoJABXFbVkYo4/vV215jiGbzCVcECt/ kRJw== X-Gm-Message-State: AOAM532vRSbEObiLerdSmCr9jSMykZaTqB1q8weLHQLyp6pWRnCEjVNt PRsEWhxc60PRlh5qePnEuoQVJlBMofCIfGRAP1qSY9GVGHU= X-Google-Smtp-Source: ABdhPJxLA6c/7alKgNCAJCEd8L3wD9Ii11WKGDWTjU+v1GgSDFP5suoAhG0iTQbYpyBZCQixYxLAMFnYbr+woDeioTM= X-Received: by 2002:a6b:7d02:: with SMTP id c2mr11577184ioq.146.1592723223055; Sun, 21 Jun 2020 00:07:03 -0700 (PDT) Received-SPF: pass client-ip=209.85.166.41; envelope-from=vskytta@gmail.com; helo=mail-io1-f41.google.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/21 03:07:03 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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:16422 Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I../. -I.././include -I.././lib -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/build/bash-N2nMjo/bash-4.4.18=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-parentheses -Wno-format-security uname output: Linux uncleman.localhost 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux Machine Type: x86_64-pc-linux-gnu Bash Version: 4.4 Patch Level: 20 Release Status: release Description: Setting/unsetting posix mode interferes with keybindings. This is a problem e.g. with completion functions that use process substitution; they need to control the posixness state in order to not run into syntax errors when they happen to be invoked in posix mode shells. This is not limited to the above bash version, it has been reported to happen with much newer ones as well. More info and background at https://github.com/scop/bash-completion/issues/190 Repeat-By: Add these lines to ~/.inputrc: set editing-mode vi Tab: menu-complete Then, in a new shell: $ bind -q menu-complete menu-complete can be invoked via "\C-i", "\C-n". $ shopt -uo posix # or -so, or set [+-]o $ bind -q menu-complete menu-complete can be invoked via "\C-n". Notice how \C-i was lost. It does not matter whether setting posix actually changed its state, happens also e.g. when unsetting when already unset.