小编Lan*_*opp的帖子

Tmux 不响应 OS X Yosemite Terminal 中的滚动

最近,我更新到了 OS X Yosemite,很高兴地发现 Apple 在他们的终端应用程序中添加了鼠标支持。这在滚动浏览我的历史记录的标准终端窗口和类似 less 的应用程序中非常有效。但是,当我使用触控板启动 tmux 滚动时,会滚动浏览我的命令历史记录而不是终端输出。

这是我的.tmux.conf文件的样子:

# INTERFACE

# enable mouse support
set-window-option -g mode-mouse on

# set up the default command to ensure the window's name is empty if it's not already defined and
# to reattach the user namespace to the current shell
set-option -g default-command 'reattach-to-user-namespace -l $SHELL;'

# modify the split pane keyboard shortcuts
unbind %
unbind '"'
bind '"' split-window -h
bind = split-window -v

# …
Run Code Online (Sandbox Code Playgroud)

mouse terminal scrolling tmux macos

5
推荐指数
1
解决办法
1783
查看次数

http://localhost:3000 有效,但 http://127.0.0.1:3000 无效

我正在本地开发机器上构建 Rails 应用程序。当运行我的本地服务器时,我可以http://localhost:3000毫无问题地访问。但是,当我尝试导航到 时http://127.0.0.1:3000,我得到一个ERR_CONNECTION_REFUSED. 通常,我不会关心这个问题,但是当我尝试使用 访问隧道时ngrok,我收到此错误:

Tunnel <URL> unavailable

Unable to initiate connection to 127.0.0.1:3000. A web server must be running on port 127.0.0.1:3000 to complete the tunnel.
Run Code Online (Sandbox Code Playgroud)

今天早上我全新安装了 OS X,系统上运行的唯一内容就是我的dotfiles readme中的内容。这是我的完整/etc/hosts文件:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1   localhost
255.255.255.255 broadcasthost
::1             localhost 
Run Code Online (Sandbox Code Playgroud)

networking web-development hosts localhost macos

5
推荐指数
1
解决办法
1万
查看次数

设置 $SHELL 环境变量

出于某种原因,当我运行时chsh -s /bin/zsh,我的$SHELL环境变量没有设置。当我运行时:

echo $SHELL
Run Code Online (Sandbox Code Playgroud)

它输出:

/bin/bash
Run Code Online (Sandbox Code Playgroud)

linux unix zsh shell macos

3
推荐指数
1
解决办法
329
查看次数

标签 统计

macos ×3

hosts ×1

linux ×1

localhost ×1

mouse ×1

networking ×1

scrolling ×1

shell ×1

terminal ×1

tmux ×1

unix ×1

web-development ×1

zsh ×1