elementary / terminal

Terminal emulator designed for elementary OS
https://elementary.io
GNU Lesser General Public License v3.0
399 stars 96 forks source link

No autocomplete of commands on fresh install #727

Closed ayoungethan closed 1 year ago

ayoungethan commented 1 year ago

What Happened?

Upon fresh install of Elementary OS 7.0 upgrading from 6.1, the terminal has only basic functionality. All commands seem to work, but autocomplete does not. Also, the terminal used to have the command prompt color-coded. It is not color-coded, but the same color as all the input text (see attached screenshot) Screenshot from 2023-05-05 15 46 43

Steps to Reproduce

  1. Installed Elementary OS 7
  2. Launched terminal
  3. Tried to use tab key for terminal autocomplete
  4. Either nothing happens, or the output offers only directory autocomplete options
  5. Tried uninstalling and reinstalling app via AppCenter
  6. AppCenter does not successfully uninstall terminal
  7. Uninstalled via command line: sudo apt purge io.elementary.terminal
  8. Reinstalled app
  9. Same behavior
  10. Installed a different terminal emulator, which behaves as expected (tabbed autocomplete works for commands)

Expected Behavior

I expect the terminal to offer tabbed autocomplete. Tabbed autocomplete doesn't work for commands, only for directories (see attached screenshot) Screenshot from 2023-05-05 15 53 18

OS Version

7.x (Horus)

Software Version

Latest release (I have run all updates)

Log Output

No response

Hardware Info

No response

jeremypw commented 1 year ago

I've just done a fresh install of Elementary 7.0 from the most recent stable ISO and I do not experience this problem. Both paths and commands complete as expected. This is with the UK locale and keyboard (and bash shell)

ayoungethan commented 1 year ago

Yes, the prior install attempt after experiencing a fatal install failure several times (yes the image checksum was verified, it had something to do with a failure to partition the install drive) had a fully functioning terminal but was unable to log into any user account/desktop environment from the greeter after a couple of reboots and some rote software install/updates.

This install has been more reliable so far but came with this terminal issue. As I said, purging and reinstalling the terminal doesn't help, which is strange because other terminal emulators function just fine. I am unsure what to do to test or diagnose or troubleshoot this further.

On Wed, May 10, 2023, 11:17 Jeremy Wootten @.***> wrote:

I've just done a fresh install of Elementary 7.0 from the most recent stable ISO and I do not experience this problem. Both paths and commands complete as expected. This is with the UK locale and keyboard (and bash shell)

— Reply to this email directly, view it on GitHub https://github.com/elementary/terminal/issues/727#issuecomment-1542618978, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACIUXLLSPRNO6X5P7U6TZQ3XFPLUTANCNFSM6AAAAAAXXVJ26E . You are receiving this because you authored the thread.Message ID: @.***>

jeremypw commented 1 year ago

Strange. I do not think this is a Terminal app problem though - autocompletion is handled by the underlying shell (bash).

According to https://linuxhandbook.com/enable-tab-completion/, a possible fix is to run the command sudo apt install bash-completion

However, that package extends the basic functionality not provides it. I do not have it installed and I do not experience the problem.

You could try reinstalling the bash package. sudo apt reinstall bash

Marukesu commented 1 year ago

This is definitively a shell issue, i see from the second image that you are missing a .bashrc file in the home directory, that file is where tab-completion (and the coloured prompt) is enabled by default.

ayoungethan commented 1 year ago

Interesting! It sounds like this might be a bigger issue than just the terminal...

Just comparing from my final backup to what I had in my home folder on a fresh install, several files are missing: .bash_logout .bashrc .inputrc .profile .dbus folder...

When I restore from backup, I only selectively restore some hidden folders (most notably the .var) and typically leave out most hidden files and folders so that they can be automatically replaced by new ones, to avoid weird desktop behavior/conflicts. So it seems one issue is that for some reason these files and folders were not freshly created in the install process...

Which of these files/folders are still relevant to and should exist in a 7.0 install (vs 6.1)? What would be a recommended way to create these missing files? Is it safe to copy these from my last 6.1 install backup?

Thank you folks for helping to get to the bottom of this!

ethan

On Wed, May 10, 2023 at 4:27 PM Gustavo Marques @.***> wrote:

This is definitively a shell issue, i see from the second image that you are missing a .bashrc file in the home directory, that file is where tab-completion (and the coloured prompt) is enabled by default.

— Reply to this email directly, view it on GitHub https://github.com/elementary/terminal/issues/727#issuecomment-1542930822, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACIUXLMOAJFTXZRYH37IIE3XFQP6PANCNFSM6AAAAAAXXVJ26E . You are receiving this because you authored the thread.Message ID: @.***>

Marukesu commented 1 year ago

for the .bashrc, .inputrc, .profile and .bash_logout files, it's actually depend on the contents, it's should be fine to copy from the backup if they are in the default state. i can't say much about the .dbus folder thought.

jeremypw commented 1 year ago

I am going to close this as an Terminal issue but you can continue to discuss here if necessary as the issue continues to exist.

ayoungethan commented 1 year ago

To be safe, I created a new temporary admin account, copied the missing files and reset ownership to each user. Behavior is now as expected. Not sure why those files were never created in the first place upon initial user account creation!

The new temporary admin account I copied files from also did not have a .dbus folder so I am ignoring that for now. Thank you!