Ticket #3237 (closed defect: fixed)

Opened 10 years ago

Last modified 10 years ago

Fish subshell pwd passing to mc is broken on Debian (with patch)

Reported by: chown Owned by: andrew_b
Priority: major Milestone: 4.8.13
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

Fish subshell pwd passing doesn't work on Debian Wheezy when under $HOME since the default fish setup on Wheezy has a pwd function that compresses $HOME to ~.

Version: master, commit aa6ad48

Steps to reproduce:

  • start fish shell & make mc use it as a subshell
    fish
    set SHELL (which fish)
    
  • start mc from $HOME
    cd ~
    mc
    
  • go to subshell
  • if not on Wheezy, simulate the pwd implementation (has to be done in subshell on Ubuntu)
    function pwd
        echo $PWD | sed -e "s|^$HOME|~|"
    end
    
  • change to some sub-dir
    cd some_dir
    
  • return from subshell

Expected behaviour:

  • return to mc with current panel in ~/some_dir

Actual behaviour:

  • warning message appears "The commander can't change to the directory that the subshell claims you are in..."
  • returns to mc with current panel still in ~

Instead of calling pwd (which can be a function), it is safer to use the $PWD variable since it is read-only and not manipulated. Attached is a patch with the change to echo $PWD.

Tested on Debian 7 with fish 1.23.1 and Ubuntu 14.04 with fish 2.0.0

Attachments

fish_pwd_fix.diff (592 bytes) - added by chown 10 years ago.

Change History

Changed 10 years ago by chown

comment:1 Changed 10 years ago by andrew_b

  • Status changed from new to accepted
  • Owner set to andrew_b
  • Branch state changed from no branch to on review
  • Milestone changed from Future Releases to 4.8.13

comment:2 Changed 10 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from on review to approved

comment:3 Changed 10 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

comment:4 Changed 10 years ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.