diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2023-06-27 14:50:20 +0200 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2023-06-27 14:50:20 +0200 |
| commit | 8697555125c57ae64a0c9b78514b4aac4fd523de (patch) | |
| tree | a699df53a7c35a4425f30bca86982c4341f6de40 /content/posts/2020-09-08-bind-warning-on-login.md | |
| parent | 33b2615a5038bc85036081e8b5e0da8584d88097 (diff) | |
| download | mitjafelicijan.com-8697555125c57ae64a0c9b78514b4aac4fd523de.tar.gz | |
Massive formatting and added figcaption
Diffstat (limited to 'content/posts/2020-09-08-bind-warning-on-login.md')
| -rw-r--r-- | content/posts/2020-09-08-bind-warning-on-login.md | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/content/posts/2020-09-08-bind-warning-on-login.md b/content/posts/2020-09-08-bind-warning-on-login.md index d5d725e..113c67b 100644 --- a/content/posts/2020-09-08-bind-warning-on-login.md +++ b/content/posts/2020-09-08-bind-warning-on-login.md | |||
| @@ -5,19 +5,18 @@ date: 2020-09-08T12:00:00+02:00 | |||
| 5 | draft: false | 5 | draft: false |
| 6 | --- | 6 | --- |
| 7 | 7 | ||
| 8 | Recently I moved back to [bash](https://www.gnu.org/software/bash/) as my | 8 | Recently I moved back to [bash](https://www.gnu.org/software/bash/) as my |
| 9 | default shell. I was previously using [fish](https://fishshell.com/) and got | 9 | default shell. I was previously using [fish](https://fishshell.com/) and got |
| 10 | used to the cool features it has. But, regardless of that, I wanted to move to | 10 | used to the cool features it has. But, regardless of that, I wanted to move to a |
| 11 | a more standard shell because I was hopping back and forth with exporting | 11 | more standard shell because I was hopping back and forth with exporting |
| 12 | variables and stuff like that which got pretty annoying. | 12 | variables and stuff like that which got pretty annoying. |
| 13 | 13 | ||
| 14 | So I embarked on a mission to make [bash](https://www.gnu.org/software/bash/) | 14 | So I embarked on a mission to make [bash](https://www.gnu.org/software/bash/) |
| 15 | more like [fish](https://fishshell.com/) and in the process found that I really | 15 | more like [fish](https://fishshell.com/) and in the process found that I really |
| 16 | missed autosuggest with TAB on changing directories. | 16 | missed autosuggest with TAB on changing directories. |
| 17 | 17 | ||
| 18 | I found a nice alternative that emulates [zsh](http://zsh.sourceforge.net/) | 18 | I found a nice alternative that emulates [zsh](http://zsh.sourceforge.net/) like |
| 19 | like autosuggestion and autocomplete so I added the following to my `.bashrc` | 19 | autosuggestion and autocomplete so I added the following to my `.bashrc` file. |
| 20 | file. | ||
| 21 | 20 | ||
| 22 | ```bash | 21 | ```bash |
| 23 | bind "TAB:menu-complete" | 22 | bind "TAB:menu-complete" |
| @@ -27,15 +26,16 @@ bind "set menu-complete-display-prefix on" | |||
| 27 | bind '"\e[Z":menu-complete-backward' | 26 | bind '"\e[Z":menu-complete-backward' |
| 28 | ``` | 27 | ``` |
| 29 | 28 | ||
| 30 | I haven't noticed anything wrong with this and all was working fine until I | 29 | I haven't noticed anything wrong with this and all was working fine until I |
| 31 | restarted my machine and then I got this error. | 30 | restarted my machine and then I got this error. |
| 32 | 31 | ||
| 33 |  | 32 |  |
| 34 | 33 | ||
| 35 | When I pressed OK, I got into the [Gnome shell](https://wiki.gnome.org/Projects/GnomeShell) | 34 | When I pressed OK, I got into the [Gnome |
| 36 | and all was working fine, but the error was still bugging me. I started looking | 35 | shell](https://wiki.gnome.org/Projects/GnomeShell) and all was working fine, but |
| 37 | for the reason why this is happening and found a solution to this error on | 36 | the error was still bugging me. I started looking for the reason why this is |
| 38 | [Remote SSH Commands - bash bind warning: line editing not enabled](https://superuser.com/a/892682). | 37 | happening and found a solution to this error on [Remote SSH Commands - bash bind |
| 38 | warning: line editing not enabled](https://superuser.com/a/892682). | ||
| 39 | 39 | ||
| 40 | So I added a simple `if [ -t 1 ]` around `bind` statements to avoid running | 40 | So I added a simple `if [ -t 1 ]` around `bind` statements to avoid running |
| 41 | commands that presume the session is interactive when it isn't. | 41 | commands that presume the session is interactive when it isn't. |
| @@ -51,4 +51,3 @@ fi | |||
| 51 | ``` | 51 | ``` |
| 52 | 52 | ||
| 53 | After logging out and back in the problem was gone. | 53 | After logging out and back in the problem was gone. |
| 54 | |||
