flozz / nautilus-terminal

A terminal embedded in Nautilus, the GNOME's file browser
GNU General Public License v3.0
323 stars 24 forks source link

Terminal current command should be cleared before cd to another folder #69

Closed eduararley closed 3 years ago

eduararley commented 3 years ago

Bug description

If there's any partial command written in terminal, and then folder is changed in Nautilus, the "cd" command is appended to the existing command, and then everything is executed, which gives an unexpected behavior

What happened

"cd" command is appended to whatever is currently on the terminal

What was expected

Partial command should be cleared before running the "cd" command

Step to reproduce

  1. Write any partial command in terminal
  2. Change to another directory in nautilus

→ Always reproducible

System information

~ python3 -m nautilus_terminal --print-debug                                                                                                                                                       
/usr/bin/python3: No module named nautilus_terminal.__main__; 'nautilus_terminal' is a package and cannot be directly executed
flozz commented 3 years ago

Hello,

This could be solved by enabling the auto-cut-user-input option of Nautilus Terminal:

Capture d’écran de 2021-07-30 17-27-07

It should removes everything on the prompt before writing the cd command :)

eduararley commented 3 years ago

Seems I'll need to wait for Antonio Rojas to package v4.0.2, as right now Arch and Manjaro has v3.5.0:

~ pamac info nautilus-terminal                                                                                                                                                                       
Name                  : nautilus-terminal
Version               : 3.5.0-1
Description           : Embedded terminal for Nautilus
URL                   : https://github.com/flozz/nautilus-terminal
Licenses              : GPL3
Repository            : community
Installed Size        : 91,1 kB
Depends On            : python-nautilus python-psutil vte3
Make Dependencies     : git python-setuptools
Packager              : Antonio Rojas <arojas@archlinux.org>
Build Date            : 17/04/21
Install Date          : 30/07/21
Install Reason        : Explicitly installed
Signatures            : Yes