> It also seems to me from your description of the problem like the bash
> script that is failing is executed automatically based on a tmux or fish
> config file rather than interactively entering the script name at a fish
> prompt.

It doesn't matter in this case.

> Regardless of whether the answer is yes or no we need
> clarification. Ideally you should be able to provide sufficient detail
> that
> someone else can reproduce the problem.

I try to describe the steps as detailed as possible, please let me know
what's missing:

Prerequisites:
------------------
1.a)  Ubuntu (in my case "Ubuntu 14.04.3 LTS")
1.b)  Tmux ( I've tested with with ubuntu included version 1.8, but also
built the latest release 2.1)
1.c)  Fish  ( I've tested with with ubuntu standard version ??, but also
built, version 2.2.0-459-gf045d9b)
1.d)  Bash (tested with standard GNU bash, version 4.3.11(1)-release

2.a)  A bash script 'test.sh' with the minimal content of:
~~~~~~~~~~~~~~
  #!/bin/bash
  #stty echo
  echo "Your name please"
  read input
  echo hello $input
  echo "Press enter to quit ..."
  read k 
~~~~~~~~~~~~~~~
2.b) Save the script under ~/test.sh and make it executable with chmod
0755 test.sh

3.)  A '~/.tmux.conf' configuration with the minimal content of
~~~~~~~~~~
set -g default-shell /usr/bin/fish
~~~~~~~~~~~

Steps to reproduce:
--------------------------
1.) Open a terminal emulator and call 'tmux'. As soon as tmux opens, you
can test the script by executing "~/test.sh". If the script works,
continue with step 2.

2.) Write the following command and press enter:
      tmux split-window "~/test.sh"

3.) Try to enter characters and try to press 'Enter'. If nothing
happens, you have to quit with Ctrl-C


Thanks for trying this at home ...





On Wed, Dec 16, 2015, at 04:53 AM, Kurtis Rader wrote:
> On Tue, Dec 15, 2015 at 5:46 AM, ben yakawp <ben.li...@yakawp.com> wrote:
> >
> > I'm not sure what you mean. I think I do had a problem,
> 
> 
> I agree that you have a problem. But I think your diagnosis of the
> problem
> is incorrect.
> 
> 
> > but from what I
> > understand now, it was not caused by an error or anything but was a
> > consequence of a behaviour on how fish preserves tty modes between
> > commands ( see the answer of Mike Meyer with the link to
> > https://github.com/fish-shell/fish-shell/pull/2317 ).
> >
> > > What do you see if you run "stty -a" from a fish prompt?
> >
> > speed 38400 baud; rows 31; columns 113; line = 0;
> > intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
> > eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt
> > = ^R;
> > werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
> > -parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
> > -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon
> > -ixoff
> > -iuclc -ixany -imaxbel iutf8
> > opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0
> > vt0 ff0
> > isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop
> > -echoprt
> > echoctl echoke
> >
> 
> The "stty -a" you ran is an external command like the bash script you
> mentioned. Both of them would have had the same terminal modes. You can
> see
> from your "stty -a" output that "echo" mode is enabled. So there is
> something else going on that you haven't documented. You say
> 
> > with the split I also run a command which in this case is a bash script
> which reads user input, like
> 
> When you say "reads input, like" I conclude your example script is meant
> as
> an approximation of the real script. What happens if you create a file
> with
> that conten, make it executable with "chmod 755", t and execute it from a
> fish prompt? Do you see the characters you type echoed? Is the [enter]
> key
> (carriage-return) correctly handled?
> 
> It also seems to me from your description of the problem like the bash
> script that is failing is executed automatically based on a tmux or fish
> config file rather than interactively entering the script name at a fish
> prompt. Regardless of whether the answer is yes or no we need
> clarification. Ideally you should be able to provide sufficient detail
> that
> someone else can reproduce the problem.
> 
> -- 
> Kurtis Rader
> Caretaker of the exceptional canines Junior and Hank

------------------------------------------------------------------------------
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to