“gnome-terminal -e tmux ./” continua abrindo terminais para sempre

2

Recentemente, perguntei a esta questão . Eu nunca usarei o primeiro método.

gnome-terminal -e tmux ./ se eu colocar isso em .zshrc ou .bashrc (ambos os shells, mesmo problema). Se eu usar isso, o terminal continuará abrindo novos terminais para sempre, loop infinito.

Eu perguntei ao usuário sobre isso, ele disse que está trabalhando em seu computador, então eu aceitei sua resposta, ele tentou ajudar e a recompensa expiraria, mas a questão ainda está lá.

Se eu emitir esse comando, ele funcionará muito bem, mas não quando .zshrc ou .bashrc . O usuário acha que meu .zshrc está errado, mas não é, senão teria visto um erro ao fazer o sourcing. de qualquer forma aqui está

ZSH_THEME="robbyrussell"
plugins=(git)
source $ZSH/oh-my-zsh.sh
alias ll='ls -l'
alias rm='rm -i'
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ......="cd ../../../../.."
alias githd='git reset --hard HEAD'
alias bre='gedit ~/.zshrc'
alias brs='source ~/.zshrc'
alias wl='sudo modprobe -r wl'
alias clam='sudo clamscan  -r -i / > ~/clamav/clamav.log'
alias xa='sudo /opt/lampp/manager-linux-x64.run'
alias net='sudo nethogs'
alias android='sudo sh /opt/android-studio/bin/studio.sh'
alias rmgit='sudo rm -rf .git'
# Functions
function conv () { if ffmpeg -i $1 -codec copy $2;
then gvfs-trash $1 && cd ..;
fi }
function rt() { gvfs-trash $@; }
function mkcd {
  last=$(eval "echo \$$#")
  if [ ! -n "$last" ]; then
    echo "Enter a directory name"
  elif [ -d $last ]; then
    echo "\'$last' already exists"
  else
    mkdir $@ && cd $last
  fi
}
function j { java -jar $1; }
cmd() { curl "http://www.commandlinefu.com/commands/matching/$(echo "$@" \
    | sed 's/ /-/g')/$(echo -n $@ | base64)/plaintext" ;}
calc() {
  if which python2 &>/dev/null; then
    python2 -ic "from __future__ import division; from math import *; from random import *"
  elif which python3 &>/dev/null; then
    python3 -ic "from math import *; import cmath"
  elif which bc &>/dev/null; then
    bc -q -l
  else
    echo "Requires python2, python3 or bc for calculator features"
  fi
}
myip() {
  echo "--------------- Network Information ---------------"
  echo "router ip:" $(netstat -rn | awk 'FNR == 3 {print $2}')
  # newer system like archlinux
  ip addr | awk '/global/ {print $1,$2}' | cut -d\/ -f1
  ip addr | awk '/global/ {print $3,$4}'
  ip addr | awk '/ether/ {print $1,$2}'
  ip addr | awk '/scope link/ {print $1,$2}' | cut -d\/ -f1
  # older system like debian
  ifconfig | awk '/inet addr/ {print $1,$2}' | awk -F: '{print $1,$2}'
  ifconfig | awk '/Bcast/ {print $3}' | awk -F: '{print $1,$2}'
  ifconfig | awk '/inet addr/ {print $4}' | awk -F: '{print $1,$2}'
  ifconfig | awk '/HWaddr/ {print $4,$5}'
  ifconfig | awk '/Scope:Link/ {print $1,$3}' | cut -d\/ -f1
  # echo External IP $(curl -s http://checkip.dyndns.org/ | grep -o "[[:digit:].]\+")
  # echo External IP: $(curl -s http://ipaddr.io/)
  # echo External IP: $(curl -s https://icanhazip.com/)
  # echo External IP: $(curl -s https://ifconfig.co/)
  # echo External IP: $(curl -s http://pasteip.me/api/cli/ && echo)
  echo external ip: $(curl -s http://ipecho.net/plain)
  echo "---------------------------------------------------"
}
down4me() { curl -s "http://www.downforeveryoneorjustme.com/$1" | sed '/just you/!d;s/<[^>]*>//g';}
# Needed for virtualenvwrapper
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2.7
export VIRTUALENVWRAPPER_PYTHON
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Documents/Projects/Python
source /usr/bin/virtualenvwrapper.sh

.tmux.conf

assume-paste-time 1
base-index 0
bell-action any
bell-on-alert off
default-command ""
default-shell "/bin/zsh"
destroy-unattached off
detach-on-destroy on
display-panes-active-colour red
display-panes-colour blue
display-panes-time 1000
display-time 750
history-limit 2000
key-table "root"
lock-after-time 0
lock-command "lock -np"
message-command-style fg=yellow,bg=black
message-style fg=black,bg=yellow
mouse off
prefix C-b
prefix2 None
renumber-windows off
repeat-time 500
set-remain-on-exit off
set-titles off
set-titles-string "#S:#I:#W - "#T" #{session_alerts}"
status on
status-interval 15
status-justify left
status-keys emacs
status-left "[#S] "
status-left-length 10
status-left-style default
status-position bottom
status-right " "#{=21:pane_title}" %H:%M %d-%b-%y"
status-right-length 40
status-right-style default
status-style fg=black,bg=green
update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
visual-activity off
visual-bell off
visual-silence off
word-separators " -_@"

executando HOME=/home/user/Documents gnome-terminal -e tmux ./ do terminal, por exemplo, não funcionará, ele abriria o tmux, mas não na pasta Documents , mas em ~/

    
por Lynob 27.02.2017 / 22:05

0 respostas