Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work in nushell (sees it as generic shell) #1441

Open
afresquet opened this issue Apr 27, 2024 · 1 comment · May be fixed by #1442
Open

Doesn't work in nushell (sees it as generic shell) #1441

afresquet opened this issue Apr 27, 2024 · 1 comment · May be fixed by #1442

Comments

@afresquet
Copy link

The output of thefuck --version (something like The Fuck 3.1 using Python 3.5.0 and Bash 4.4.12(1)-release):

The Fuck 3.32 using Python 3.11.9 and Generic Shell

Your system (Debian 7, ArchLinux, Windows, etc.):

NixOS 24.05.20240425.7bb2ccd (Uakari) x86_64

How to reproduce the bug:

Enable `thefuck` in `home-manager` and add [alias configuration to Nushell](https://github.com/nvbn/thefuck/wiki/Shell-aliases#nushell).

Alias configuration to Nushell

The output of The Fuck with THEFUCK_DEBUG=true exported (typically execute export THEFUCK_DEBUG=true in your shell before The Fuck):

❯ THEFUCK_DEBUG=true fuck
DEBUG: Run with settings: {'alter_history': True,
 'debug': True,
 'env': {'GIT_TRACE': '1', 'LANG': 'C', 'LC_ALL': 'C'},
 'exclude_rules': [],
 'excluded_search_path_prefixes': [],
 'history_limit': None,
 'instant_mode': False,
 'no_colors': False,
 'num_close_matches': 3,
 'priority': {},
 'repeat': False,
 'require_confirmation': True,
 'rules': [<const: All rules enabled>],
 'slow_commands': ['lein', 'react-native', 'gradle', './gradlew', 'vagrant'],
 'user_dir': PosixPath('/home/afresquet/.config/thefuck'),
 'wait_command': 3,
 'wait_slow_command': 15}
DEBUG: Received output: 00:32:14.343918 git.c:750               trace: exec: git-brnch
00:32:14.344077 run-command.c:657       trace: run_command: git-brnch
git: 'brnch' is not a git command. See 'git --help'.

The most similar command is
        branch

DEBUG: Call: git brnch; with env: {'SHELL': '/run/current-system/sw/bin/nu', 'WINDOWID': '94296824570032', '__ETC_PROFILE_DONE': '1', '__HM_SESS_VARS_SOURCED': '1', 'COLORTERM': 'truecolor', 'HYPRLAND_CMD': '/etc/profiles/per-user/afresquet/bin/Hyprland', 'XDG_CONFIG_DIRS': '/etc/xdg:/home/afresquet/.nix-profile/etc/xdg:/nix/profile/etc/xdg:/home/afresquet/.local/state/nix/profile/etc/xdg:/etc/profiles/per-user/afresquet/etc/xdg:/nix/var/nix/profiles/default/etc/xdg:/run/current-system/sw/etc/xdg', 'ZELLIJ_SESSION_NAME': 'polished-crab', 'XDG_SESSION_PATH': '/org/freedesktop/DisplayManager/Session3', 'XDG_BACKEND': 'wayland', 'NU_LOG_FORMAT': '%ANSI_START%%DATE%|%LEVEL%|%MSG%%ANSI_STOP%', 'PYTHONNOUSERSITE': 'true', 'LAST_EXIT_CODE': '1', 'DIRS_POSITION': '0', 'XCURSOR_PATH': '/home/afresquet/.icons:/home/afresquet/.local/share/icons:/home/afresquet/.nix-profile/share/icons:/home/afresquet/.nix-profile/share/pixmaps:/nix/profile/share/icons:/nix/profile/share/pixmaps:/home/afresquet/.local/state/nix/profile/share/icons:/home/afresquet/.local/state/nix/profile/share/pixmaps:/etc/profiles/per-user/afresquet/share/icons:/etc/profiles/per-user/afresquet/share/pixmaps:/nix/var/nix/profiles/default/share/icons:/nix/var/nix/profiles/default/share/pixmaps:/run/current-system/sw/share/icons:/run/current-system/sw/share/pixmaps', 'PROMPT_MULTILINE_INDICATOR': '\x1b[90m∙\x1b[0m ', 'LOCALE_ARCHIVE_2_27': '/nix/store/jvl3jfhnq71m8ilxhzhgyj7vdxjnd2z7-glibc-locales-2.39-5/lib/locale/locale-archive', 'DESKTOP_SESSION': 'hyprland', 'NO_AT_BRIDGE': '1', 'XCURSOR_SIZE': '24', 'EDITOR': '/nix/store/rzb85bzmy5g43bkgkyxlf67dxpkx7bb3-helix-24.03/bin/hx', 'XDG_SEAT': 'seat0', 'PWD': '/home/afresquet/dotfiles', 'NIX_PROFILES': '/run/current-system/sw /nix/var/nix/profiles/default /etc/profiles/per-user/afresquet /home/afresquet/.local/state/nix/profile /nix/profile /home/afresquet/.nix-profile', 'XDG_SESSION_DESKTOP': '', 'LOGNAME': 'afresquet', 'ZELLIJ_PANE_ID': '0', 'XDG_SESSION_TYPE': 'wayland', 'NIX_PATH': 'nixpkgs=flake:nixpkgs:/nix/var/nix/profiles/per-user/root/channels', 'NIXPKGS_CONFIG': '/etc/nix/nixpkgs-config.nix', 'CMD_DURATION_MS': '7', 'HOME': '/home/afresquet', 'SSH_ASKPASS': '/nix/store/w2raf20g0yffy5xk6qzab7jw6pq8i0yj-x11-ssh-askpass-1.2.4.1/libexec/x11-ssh-askpass', 'LANG': 'C', '_JAVA_AWT_WM_NONREPARENTING': '1', 'NU_LOG_DATE_FORMAT': '%Y-%m-%dT%H:%M:%S%.3f', 'XDG_CURRENT_DESKTOP': 'Hyprland', 'STARSHIP_SHELL': 'nu', 'WAYLAND_DISPLAY': 'wayland-1', 'GIO_EXTRA_MODULES': '/nix/store/5pb1ysq8mrpdkj3gf39yjiwkvf195ydp-gvfs-1.52.2/lib/gio/modules:/nix/store/wdv7qjdzlbnmhg0s7m4aidrnfagm6z9z-dconf-0.40.0-lib/lib/gio/modules', 'XDG_SEAT_PATH': '/org/freedesktop/DisplayManager/Seat0', 'GTK_A11Y': 'none', 'STARSHIP_SESSION_KEY': 'yDX1CSwG0I2MtS2j', 'NIX_USER_PROFILE_DIR': '/nix/var/nix/profiles/per-user/afresquet', 'ALACRITTY_SOCKET': '/run/user/1000/Alacritty-wayland-1-9469.sock', 'INFOPATH': '/home/afresquet/.nix-profile/info:/home/afresquet/.nix-profile/share/info:/nix/profile/info:/nix/profile/share/info:/home/afresquet/.local/state/nix/profile/info:/home/afresquet/.local/state/nix/profile/share/info:/etc/profiles/per-user/afresquet/info:/etc/profiles/per-user/afresquet/share/info:/nix/var/nix/profiles/default/info:/nix/var/nix/profiles/default/share/info:/run/current-system/sw/info:/run/current-system/sw/share/info', 'XDG_SESSION_CLASS': 'user', 'TERM': 'alacritty', 'GTK_PATH': '/home/afresquet/.nix-profile/lib/gtk-2.0:/home/afresquet/.nix-profile/lib/gtk-3.0:/home/afresquet/.nix-profile/lib/gtk-4.0:/nix/profile/lib/gtk-2.0:/nix/profile/lib/gtk-3.0:/nix/profile/lib/gtk-4.0:/home/afresquet/.local/state/nix/profile/lib/gtk-2.0:/home/afresquet/.local/state/nix/profile/lib/gtk-3.0:/home/afresquet/.local/state/nix/profile/lib/gtk-4.0:/etc/profiles/per-user/afresquet/lib/gtk-2.0:/etc/profiles/per-user/afresquet/lib/gtk-3.0:/etc/profiles/per-user/afresquet/lib/gtk-4.0:/nix/var/nix/profiles/default/lib/gtk-2.0:/nix/var/nix/profiles/default/lib/gtk-3.0:/nix/var/nix/profiles/default/lib/gtk-4.0:/run/current-system/sw/lib/gtk-2.0:/run/current-system/sw/lib/gtk-3.0:/run/current-system/sw/lib/gtk-4.0', 'LESSOPEN': '|/nix/store/ldgc5c22pi4s89za4zn8jslmgd9x9ny1-lesspipe-2.11/bin/lesspipe.sh %s', 'USER': 'afresquet', 'PROMPT_INDICATOR': '', 'TZDIR': '/etc/zoneinfo', 'HYPRLAND_INSTANCE_SIGNATURE': 'v0.39.1_1714254937', 'DISPLAY': ':1', 'SHLVL': '0', 'MOZ_ENABLE_WAYLAND': '1', 'PAGER': 'less', 'QTWEBKIT_PLUGIN_PATH': '/home/afresquet/.nix-profile/lib/mozilla/plugins/:/nix/profile/lib/mozilla/plugins/:/home/afresquet/.local/state/nix/profile/lib/mozilla/plugins/:/etc/profiles/per-user/afresquet/lib/mozilla/plugins/:/nix/var/nix/profiles/default/lib/mozilla/plugins/:/run/current-system/sw/lib/mozilla/plugins/', '__NIXOS_SET_ENVIRONMENT_DONE': '1', 'XDG_VTNR': '3', 'XDG_SESSION_ID': '5', 'LOCALE_ARCHIVE': '/run/current-system/sw/lib/locale/locale-archive', 'LESSKEYIN_SYSTEM': '/nix/store/gs3jrs5sc0brda4wjl6wa4hraldz8m3g-lessconfig', 'TERMINFO_DIRS': '/home/afresquet/.nix-profile/share/terminfo:/nix/profile/share/terminfo:/home/afresquet/.local/state/nix/profile/share/terminfo:/etc/profiles/per-user/afresquet/share/terminfo:/nix/var/nix/profiles/default/share/terminfo:/run/current-system/sw/share/terminfo', 'XDG_RUNTIME_DIR': '/run/user/1000', 'NIX_XDG_DESKTOP_PORTAL_DIR': '/run/current-system/sw/share/xdg-desktop-portal/portals', 'NU_VERSION': '0.92.1', 'XDG_DATA_DIRS': '/nix/store/bi348mbh7mh8rpy1azx0wj240ijr0fp2-desktops/share:/home/afresquet/.nix-profile/share:/nix/profile/share:/home/afresquet/.local/state/nix/profile/share:/etc/profiles/per-user/afresquet/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share', 'LIBEXEC_PATH': '/home/afresquet/.nix-profile/libexec:/nix/profile/libexec:/home/afresquet/.local/state/nix/profile/libexec:/etc/profiles/per-user/afresquet/libexec:/nix/var/nix/profiles/default/libexec:/run/current-system/sw/libexec', 'PATH': '/nix/store/glfr70gi7hfaj50mwj2431p8bg60fhqw-python3-3.11.9/bin:/nix/store/wpr5awk915bbzdfgqsc4094l1nxsc7gy-thefuck-3.32/bin:/home/afresquet/.config/carapace/bin:/home/afresquet/.config/carapace/bin:/run/wrappers/bin:/home/afresquet/.nix-profile/bin:/nix/profile/bin:/home/afresquet/.local/state/nix/profile/bin:/etc/profiles/per-user/afresquet/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/nix/store/zfs2gv7x073znw6b250rgnbij300hva5-binutils-wrapper-2.41/bin:/nix/store/snha31clzi4zk8fgaiw5ld16h9c4q748-pciutils-3.12.0/bin:/nix/store/4kwk49k8rc8cg8c387kbbjcrl8i0y693-gcc-wrapper-13.2.0/bin', 'ALACRITTY_LOG': '/tmp/Alacritty-9469.log', 'ZELLIJ': '0', 'THEFUCK_DEBUG': 'true', 'FILE_PWD': '/home/afresquet/.cache/starship', 'NU_LIB_DIRS': '/home/afresquet/.config/nushell/scripts', 'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/1000/bus', 'ALACRITTY_WINDOW_ID': '94296824570032', 'CURRENT_FILE': '/home/afresquet/.cache/starship/init.nu', 'NU_PLUGIN_DIRS': '/home/afresquet/.config/nushell/plugins', 'OLDPWD': '/home/afresquet', 'LC_ALL': 'C', 'GIT_TRACE': '1'}; is slow: False took: 0:00:00.007724
DEBUG: Importing rule: adb_unknown_command; took: 0:00:00.000559
DEBUG: Importing rule: ag_literal; took: 0:00:00.000533
DEBUG: Importing rule: apt_get; took: 0:00:00.001249
DEBUG: Importing rule: apt_get_search; took: 0:00:00.000343
DEBUG: Importing rule: apt_invalid_operation; took: 0:00:00.000810
DEBUG: Importing rule: apt_list_upgradable; took: 0:00:00.000359
DEBUG: Importing rule: apt_upgrade; took: 0:00:00.000384
DEBUG: Importing rule: aws_cli; took: 0:00:00.000319
DEBUG: Importing rule: az_cli; took: 0:00:00.000304
DEBUG: Importing rule: brew_cask_dependency; took: 0:00:00.000753
DEBUG: Importing rule: brew_install; took: 0:00:00.000274
DEBUG: Importing rule: brew_link; took: 0:00:00.000298
DEBUG: Importing rule: brew_reinstall; took: 0:00:00.000458
DEBUG: Importing rule: brew_uninstall; took: 0:00:00.000283
DEBUG: Importing rule: brew_unknown_command; took: 0:00:00.000339
DEBUG: Importing rule: brew_update_formula; took: 0:00:00.000398
DEBUG: Importing rule: cargo; took: 0:00:00.000219
DEBUG: Importing rule: cargo_no_command; took: 0:00:00.000276
DEBUG: Importing rule: cat_dir; took: 0:00:00.000250
DEBUG: Importing rule: cd_correction; took: 0:00:00.000969
DEBUG: Importing rule: cd_cs; took: 0:00:00.000234
DEBUG: Importing rule: cd_mkdir; took: 0:00:00.000148
DEBUG: Importing rule: cd_parent; took: 0:00:00.000218
DEBUG: Importing rule: chmod_x; took: 0:00:00.000232
DEBUG: Importing rule: choco_install; took: 0:00:00.000502
DEBUG: Importing rule: composer_not_command; took: 0:00:00.000290
DEBUG: Importing rule: conda_mistype; took: 0:00:00.000275
DEBUG: Importing rule: cp_create_destination; took: 0:00:00.000259
DEBUG: Importing rule: cp_omitting_directory; took: 0:00:00.000274
DEBUG: Importing rule: cpp11; took: 0:00:00.000258
DEBUG: Importing rule: dirty_untar; took: 0:00:00.002386
DEBUG: Importing rule: dirty_unzip; took: 0:00:00.002263
DEBUG: Importing rule: django_south_ghost; took: 0:00:00.000268
DEBUG: Importing rule: django_south_merge; took: 0:00:00.000228
DEBUG: Importing rule: dnf_no_such_command; took: 0:00:00.000803
DEBUG: Importing rule: docker_image_being_used_by_container; took: 0:00:00.000292
DEBUG: Importing rule: docker_login; took: 0:00:00.000340
DEBUG: Importing rule: docker_not_command; took: 0:00:00.000674
DEBUG: Importing rule: dry; took: 0:00:00.000263
DEBUG: Importing rule: fab_command_not_found; took: 0:00:00.000291
DEBUG: Importing rule: fix_alt_space; took: 0:00:00.000302
DEBUG: Importing rule: fix_file; took: 0:00:00.001226
DEBUG: Importing rule: gem_unknown_command; took: 0:00:00.000475
DEBUG: Importing rule: git_add; took: 0:00:00.000581
DEBUG: Importing rule: git_add_force; took: 0:00:00.000267
DEBUG: Importing rule: git_bisect_usage; took: 0:00:00.000266
DEBUG: Importing rule: git_branch_0flag; took: 0:00:00.000293
DEBUG: Importing rule: git_branch_delete; took: 0:00:00.000263
DEBUG: Importing rule: git_branch_delete_checked_out; took: 0:00:00.000250
DEBUG: Importing rule: git_branch_exists; took: 0:00:00.000347
DEBUG: Importing rule: git_branch_list; took: 0:00:00.000260
DEBUG: Importing rule: git_checkout; took: 0:00:00.000287
DEBUG: Importing rule: git_clone_git_clone; took: 0:00:00.000259
DEBUG: Importing rule: git_commit_add; took: 0:00:00.000276
DEBUG: Importing rule: git_commit_amend; took: 0:00:00.000251
DEBUG: Importing rule: git_commit_reset; took: 0:00:00.000259
DEBUG: Importing rule: git_diff_no_index; took: 0:00:00.000270
DEBUG: Importing rule: git_diff_staged; took: 0:00:00.000258
DEBUG: Importing rule: git_fix_stash; took: 0:00:00.000279
DEBUG: Importing rule: git_flag_after_filename; took: 0:00:00.000262
DEBUG: Importing rule: git_help_aliased; took: 0:00:00.000268
DEBUG: Importing rule: git_hook_bypass; took: 0:00:00.000243
DEBUG: Importing rule: git_lfs_mistype; took: 0:00:00.000240
DEBUG: Importing rule: git_main_master; took: 0:00:00.000266
DEBUG: Importing rule: git_merge; took: 0:00:00.000247
DEBUG: Importing rule: git_merge_unrelated; took: 0:00:00.000248
DEBUG: Importing rule: git_not_command; took: 0:00:00.000271
DEBUG: Importing rule: git_pull; took: 0:00:00.000317
DEBUG: Importing rule: git_pull_clone; took: 0:00:00.000268
DEBUG: Importing rule: git_pull_uncommitted_changes; took: 0:00:00.000241
DEBUG: Importing rule: git_push; took: 0:00:00.000277
DEBUG: Importing rule: git_push_different_branch_names; took: 0:00:00.000244
DEBUG: Importing rule: git_push_force; took: 0:00:00.000247
DEBUG: Importing rule: git_push_pull; took: 0:00:00.000247
DEBUG: Importing rule: git_push_without_commits; took: 0:00:00.000235
DEBUG: Importing rule: git_rebase_merge_dir; took: 0:00:00.000244
DEBUG: Importing rule: git_rebase_no_changes; took: 0:00:00.000253
DEBUG: Importing rule: git_remote_delete; took: 0:00:00.000260
DEBUG: Importing rule: git_remote_seturl_add; took: 0:00:00.000238
DEBUG: Importing rule: git_rm_local_modifications; took: 0:00:00.000255
DEBUG: Importing rule: git_rm_recursive; took: 0:00:00.000245
DEBUG: Importing rule: git_rm_staged; took: 0:00:00.000256
DEBUG: Importing rule: git_stash; took: 0:00:00.000241
DEBUG: Importing rule: git_stash_pop; took: 0:00:00.000245
DEBUG: Importing rule: git_tag_force; took: 0:00:00.000258
DEBUG: Importing rule: git_two_dashes; took: 0:00:00.000301
DEBUG: Importing rule: go_run; took: 0:00:00.000308
DEBUG: Importing rule: go_unknown_command; took: 0:00:00.000457
DEBUG: Importing rule: gradle_no_task; took: 0:00:00.000418
DEBUG: Importing rule: gradle_wrapper; took: 0:00:00.000289
DEBUG: Importing rule: grep_arguments_order; took: 0:00:00.000282
DEBUG: Importing rule: grep_recursive; took: 0:00:00.000271
DEBUG: Importing rule: grunt_task_not_found; took: 0:00:00.000382
DEBUG: Importing rule: gulp_not_task; took: 0:00:00.000307
DEBUG: Importing rule: has_exists_script; took: 0:00:00.000259
DEBUG: Importing rule: heroku_multiple_apps; took: 0:00:00.000268
DEBUG: Importing rule: heroku_not_command; took: 0:00:00.000314
DEBUG: Importing rule: history; took: 0:00:00.000244
DEBUG: Importing rule: hostscli; took: 0:00:00.000341
DEBUG: Importing rule: ifconfig_device_not_found; took: 0:00:00.000330
DEBUG: Importing rule: java; took: 0:00:00.000270
DEBUG: Importing rule: javac; took: 0:00:00.000306
DEBUG: Importing rule: lein_not_task; took: 0:00:00.000301
DEBUG: Importing rule: ln_no_hard_link; took: 0:00:00.000268
DEBUG: Importing rule: ln_s_order; took: 0:00:00.000263
DEBUG: Importing rule: long_form_help; took: 0:00:00.000223
DEBUG: Importing rule: ls_all; took: 0:00:00.000267
DEBUG: Importing rule: ls_lah; took: 0:00:00.000256
DEBUG: Importing rule: man; took: 0:00:00.000268
DEBUG: Importing rule: man_no_space; took: 0:00:00.000217
DEBUG: Importing rule: mercurial; took: 0:00:00.000266
DEBUG: Importing rule: missing_space_before_subcommand; took: 0:00:00.000228
DEBUG: Importing rule: mkdir_p; took: 0:00:00.000249
DEBUG: Importing rule: mvn_no_command; took: 0:00:00.000271
DEBUG: Importing rule: mvn_unknown_lifecycle_phase; took: 0:00:00.000266
DEBUG: Importing rule: nixos_cmd_not_found; took: 0:00:00.000672
DEBUG: Importing rule: no_command; took: 0:00:00.000295
DEBUG: Importing rule: no_such_file; took: 0:00:00.000242
DEBUG: Importing rule: npm_missing_script; took: 0:00:00.000643
DEBUG: Importing rule: npm_run_script; took: 0:00:00.000269
DEBUG: Importing rule: npm_wrong_command; took: 0:00:00.000339
DEBUG: Importing rule: omnienv_no_such_command; took: 0:00:00.000666
DEBUG: Importing rule: open; took: 0:00:00.000291
DEBUG: Importing rule: pacman; took: 0:00:00.000809
DEBUG: Importing rule: pacman_invalid_option; took: 0:00:00.000300
DEBUG: Importing rule: pacman_not_found; took: 0:00:00.000226
DEBUG: Importing rule: path_from_history; took: 0:00:00.000251
DEBUG: Importing rule: php_s; took: 0:00:00.000273
DEBUG: Importing rule: pip_install; took: 0:00:00.000345
DEBUG: Importing rule: pip_unknown_command; took: 0:00:00.000315
DEBUG: Importing rule: port_already_in_use; took: 0:00:00.000374
DEBUG: Importing rule: prove_recursively; took: 0:00:00.000292
DEBUG: Importing rule: python_command; took: 0:00:00.000282
DEBUG: Importing rule: python_execute; took: 0:00:00.000286
DEBUG: Importing rule: python_module_error; took: 0:00:00.000279
DEBUG: Importing rule: quotation_marks; took: 0:00:00.000350
DEBUG: Importing rule: rails_migrations_pending; took: 0:00:00.000300
DEBUG: Importing rule: react_native_command_unrecognized; took: 0:00:00.000369
DEBUG: Importing rule: remove_shell_prompt_literal; took: 0:00:00.000273
DEBUG: Importing rule: remove_trailing_cedilla; took: 0:00:00.000250
DEBUG: Importing rule: rm_dir; took: 0:00:00.000347
DEBUG: Importing rule: rm_root; took: 0:00:00.000278
DEBUG: Importing rule: scm_correction; took: 0:00:00.000306
DEBUG: Importing rule: sed_unterminated_s; took: 0:00:00.000273
DEBUG: Importing rule: sl_ls; took: 0:00:00.000325
DEBUG: Importing rule: ssh_known_hosts; took: 0:00:00.000286
DEBUG: Importing rule: sudo; took: 0:00:00.000344
DEBUG: Importing rule: sudo_command_from_user_path; took: 0:00:00.000434
DEBUG: Importing rule: switch_lang; took: 0:00:00.000399
DEBUG: Importing rule: systemctl; took: 0:00:00.000322
DEBUG: Importing rule: terraform_init; took: 0:00:00.000266
DEBUG: Importing rule: test.py; took: 0:00:00.000213
DEBUG: Importing rule: tmux; took: 0:00:00.000272
DEBUG: Importing rule: touch; took: 0:00:00.000253
DEBUG: Importing rule: tsuru_login; took: 0:00:00.000261
DEBUG: Importing rule: tsuru_not_command; took: 0:00:00.000271
DEBUG: Importing rule: unknown_command; took: 0:00:00.000241
DEBUG: Importing rule: unsudo; took: 0:00:00.000219
DEBUG: Importing rule: vagrant_up; took: 0:00:00.000266
DEBUG: Importing rule: whois; took: 0:00:00.000390
DEBUG: Importing rule: workon_doesnt_exists; took: 0:00:00.000348
DEBUG: Importing rule: wrong_hyphen_before_subcommand; took: 0:00:00.000253
DEBUG: Importing rule: yarn_alias; took: 0:00:00.000282
DEBUG: Importing rule: yarn_command_not_found; took: 0:00:00.000501
DEBUG: Importing rule: yarn_command_replaced; took: 0:00:00.000324
DEBUG: Importing rule: yarn_help; took: 0:00:00.000325
DEBUG: Importing rule: yum_invalid_operation; took: 0:00:00.001042
DEBUG: Trying rule: path_from_history; took: 0:00:00.000260
DEBUG: Trying rule: cd_cs; took: 0:00:00.000048
DEBUG: Trying rule: dry; took: 0:00:00.000002
DEBUG: Trying rule: git_stash_pop; took: 0:00:00.000044
DEBUG: Trying rule: test.py; took: 0:00:00.000001
DEBUG: Trying rule: adb_unknown_command; took: 0:00:00.000011
DEBUG: Trying rule: ag_literal; took: 0:00:00.000018
DEBUG: Trying rule: aws_cli; took: 0:00:00.000016
DEBUG: Trying rule: az_cli; took: 0:00:00.000027
DEBUG: Trying rule: brew_link; took: 0:00:00.000016
DEBUG: Trying rule: brew_reinstall; took: 0:00:00.000011
DEBUG: Trying rule: brew_uninstall; took: 0:00:00.000009
DEBUG: Trying rule: brew_update_formula; took: 0:00:00.000011
DEBUG: Trying rule: cargo; took: 0:00:00.000002
DEBUG: Trying rule: cargo_no_command; took: 0:00:00.000013
DEBUG: Trying rule: cat_dir; took: 0:00:00.000013
DEBUG: Trying rule: cd_correction; took: 0:00:00.000016
DEBUG: Trying rule: cd_mkdir; took: 0:00:00.000012
DEBUG: Trying rule: cd_parent; took: 0:00:00.000001
DEBUG: Trying rule: chmod_x; took: 0:00:00.000002
DEBUG: Trying rule: composer_not_command; took: 0:00:00.000009
DEBUG: Trying rule: conda_mistype; took: 0:00:00.000010
DEBUG: Trying rule: cp_create_destination; took: 0:00:00.000010
DEBUG: Trying rule: cp_omitting_directory; took: 0:00:00.000020
DEBUG: Trying rule: cpp11; took: 0:00:00.000015
DEBUG: Trying rule: dirty_untar; took: 0:00:00.000009
DEBUG: Trying rule: dirty_unzip; took: 0:00:00.000010
DEBUG: Trying rule: django_south_ghost; took: 0:00:00.000001
DEBUG: Trying rule: django_south_merge; took: 0:00:00.000001
DEBUG: Trying rule: docker_image_being_used_by_container; took: 0:00:00.000009
DEBUG: Trying rule: docker_login; took: 0:00:00.000009
DEBUG: Trying rule: docker_not_command; took: 0:00:00.000011
DEBUG: Trying rule: fab_command_not_found; took: 0:00:00.000009
DEBUG: Trying rule: fix_alt_space; took: 0:00:00.000006
DEBUG: Trying rule: fix_file; took: 0:00:00.000053
DEBUG: Trying rule: gem_unknown_command; took: 0:00:00.000012
DEBUG: Trying rule: git_add; took: 0:00:00.000009
DEBUG: Trying rule: git_add_force; took: 0:00:00.000009
DEBUG: Trying rule: git_bisect_usage; took: 0:00:00.000008
DEBUG: Trying rule: git_branch_0flag; took: 0:00:00.000008
DEBUG: Trying rule: git_branch_delete; took: 0:00:00.000013
DEBUG: Trying rule: git_branch_delete_checked_out; took: 0:00:00.000011
DEBUG: Trying rule: git_branch_exists; took: 0:00:00.000009
DEBUG: Trying rule: git_branch_list; took: 0:00:00.000010
DEBUG: Trying rule: git_checkout; took: 0:00:00.000008
DEBUG: Trying rule: git_clone_git_clone; took: 0:00:00.000008
DEBUG: Trying rule: git_commit_add; took: 0:00:00.000009
DEBUG: Trying rule: git_commit_amend; took: 0:00:00.000007
DEBUG: Trying rule: git_commit_reset; took: 0:00:00.000007
DEBUG: Trying rule: git_diff_no_index; took: 0:00:00.000010
DEBUG: Trying rule: git_diff_staged; took: 0:00:00.000008
DEBUG: Trying rule: git_fix_stash; took: 0:00:00.000009
DEBUG: Trying rule: git_flag_after_filename; took: 0:00:00.000157
DEBUG: Trying rule: git_help_aliased; took: 0:00:00.000015
DEBUG: Trying rule: git_lfs_mistype; took: 0:00:00.000010
DEBUG: Trying rule: git_merge; took: 0:00:00.000009
DEBUG: Trying rule: git_merge_unrelated; took: 0:00:00.000008
DEBUG: Trying rule: git_not_command; took: 0:00:00.000009
git branch [enter/↑/↓/ctrl+c]
DEBUG: PYTHONIOENCODING: !!not-set!!
DEBUG: Total took: 0:00:01.752254
git branch

If the bug only appears with a specific application, the output of that application and its version:

nushell v0.92.1

Anything else you think is relevant:

Works without a problem for bash, zsh and fish.
`thefuck --version` in those shells return the proper shell, for nushell it returns Generic Shell (see output above in version check).
Instead of running the command suggestion, it echoes it.
@afresquet afresquet linked a pull request Apr 28, 2024 that will close this issue
@afresquet
Copy link
Author

Working on a fix in #1442

The issue isn't that there wasn't a Nushell class, but that CorrectedCommand::run writes the script to stdout like so:

sys.stdout.write(self._get_script())

I'm looking at a way to fix this because nushell seems to echo it instead of evaluating

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant