0

If I'm in a screen session and I run screen from the terminal, a new window opens up in the same directory as the previous window. However if I bind the screen command to a keybind, like this bindkey "^[[1;5A" screen, using the keybind results in a new window in the home directory instead of the current directory.

First of all, why is it like this?

Second, how do i open up a new window in the current directory through a keybind? I've read this answer but that wouldn't work, since it prints to the console and can't therefor be used while another program is running, ex webpack.

5
  • ...what is wrong with the proposed method screen -X eval "chdir $PWD" ? or like this ? Feb 3, 2018 at 21:33
  • @RobertRiedl it prints to the console
    – Olian04
    Feb 3, 2018 at 21:35
  • as always, the gold is in the comments: bindkey ^f stuff "screen^M" worked for me, using Ctrl-f. Feb 3, 2018 at 21:52
  • @RobertRiedl That prints screen to the original console...
    – Olian04
    Feb 4, 2018 at 15:21
  • For the life of me, I cannot prohibit that "screen" is printed to the original window - sorry ! Feb 6, 2018 at 13:44

0

You must log in to answer this question.

Browse other questions tagged .