diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2023-05-26 00:40:40 +0200 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2023-05-26 00:40:40 +0200 |
| commit | 43b0708769eb61392050045b881f8e6ba39c5b66 (patch) | |
| tree | 3939579a13b8325325d5ebb8e05324a41ed78a6d /content/posts/2020-09-08-bind-warning-on-login.md | |
| parent | 49e7e7d555a6cd9810d81561fa3e98e3d64502be (diff) | |
| download | mitjafelicijan.com-43b0708769eb61392050045b881f8e6ba39c5b66.tar.gz | |
Massive update to posts, archetypes
Added a archetypes for creating notes and posts so it auto-populates
fields.
Fixed existing posts so they align with the rule of 80 columns now.
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 | 28 |
1 files changed, 21 insertions, 7 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 62c421d..d5d725e 100644 --- a/content/posts/2020-09-08-bind-warning-on-login.md +++ b/content/posts/2020-09-08-bind-warning-on-login.md | |||
| @@ -1,15 +1,23 @@ | |||
| 1 | --- | 1 | --- |
| 2 | title: Fix bind warning in .profile on login in Ubuntu | 2 | title: Fix bind warning in .profile on login in Ubuntu |
| 3 | url: bind-warning-on-login-in-ubuntu.html | 3 | url: bind-warning-on-login-in-ubuntu.html |
| 4 | date: 2020-09-08 | 4 | 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 default shell. I was previously using [fish](https://fishshell.com/) and got used to the cool features it has. But, regardless of that, I wanted to move to a more standard shell because I was hopping back and forth with exporting variables and stuff like that which got pretty annoying. | 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 | ||
| 10 | used to the cool features it has. But, regardless of that, I wanted to move to | ||
| 11 | a more standard shell because I was hopping back and forth with exporting | ||
| 12 | variables and stuff like that which got pretty annoying. | ||
| 9 | 13 | ||
| 10 | So I embarked on a mission to make [bash](https://www.gnu.org/software/bash/) more like [fish](https://fishshell.com/) and in the process found that I really missed autosuggest with TAB on changing directories. | 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 | ||
| 16 | missed autosuggest with TAB on changing directories. | ||
| 11 | 17 | ||
| 12 | I found a nice alternative that emulates [zsh](http://zsh.sourceforge.net/) like autosuggestion and autocomplete so I added the following to my `.bashrc` file. | 18 | I found a nice alternative that emulates [zsh](http://zsh.sourceforge.net/) |
| 19 | like autosuggestion and autocomplete so I added the following to my `.bashrc` | ||
| 20 | file. | ||
| 13 | 21 | ||
| 14 | ```bash | 22 | ```bash |
| 15 | bind "TAB:menu-complete" | 23 | bind "TAB:menu-complete" |
| @@ -19,13 +27,18 @@ bind "set menu-complete-display-prefix on" | |||
| 19 | bind '"\e[Z":menu-complete-backward' | 27 | bind '"\e[Z":menu-complete-backward' |
| 20 | ``` | 28 | ``` |
| 21 | 29 | ||
| 22 | I haven't noticed anything wrong with this and all was working fine until I restarted my machine and then I got this error. | 30 | 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. | ||
| 23 | 32 | ||
| 24 |  | 33 |  |
| 25 | 34 | ||
| 26 | When I pressed OK, I got into the [Gnome shell](https://wiki.gnome.org/Projects/GnomeShell) and all was working fine, but the error was still bugging me. I started looking for the reason why this is happening and found a solution to this error on [Remote SSH Commands - bash bind warning: line editing not enabled](https://superuser.com/a/892682). | 35 | When I pressed OK, I got into the [Gnome shell](https://wiki.gnome.org/Projects/GnomeShell) |
| 36 | and all was working fine, but the error was still bugging me. I started looking | ||
| 37 | for the reason why this is happening and found a solution to this error on | ||
| 38 | [Remote SSH Commands - bash bind warning: line editing not enabled](https://superuser.com/a/892682). | ||
| 27 | 39 | ||
| 28 | So I added a simple `if [ -t 1 ]` around `bind` statements to avoid running commands that presume the session is interactive when it isn't. | 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. | ||
| 29 | 42 | ||
| 30 | ```bash | 43 | ```bash |
| 31 | if [ -t 1 ]; then | 44 | if [ -t 1 ]; then |
| @@ -38,3 +51,4 @@ fi | |||
| 38 | ``` | 51 | ``` |
| 39 | 52 | ||
| 40 | After logging out and back in the problem was gone. | 53 | After logging out and back in the problem was gone. |
| 54 | |||
