我不确定以下Rampion 代码的确切用途。它显然应该在光标位置执行命令。
# man-word.screen
# prevent messages from slowing this down
msgminwait 0
# copy word starting at cursor
copy # I am not sure why we need this
stuff " e "
# open a new window that waits for a word to run man on
# (and uses 'read' to pause on error)
screen -t man /bin/sh -c 'cat | xargs man || read' # option -c seems to mean execute
# feed that window the copied word
# be sure to enter '^M' as 'CTRL-V ENTER' and '^D' as 'CTRL-V CTRL-D' (in vim)
paste '.'
# should display as 'stuff "^M^D"'
stuff " "
# turn message waiting back on
msgminwait 1
# vi: ft=screen
该代码受以下^g约束
bindkey -m ^f source /Users/masi/bin/screen/edit-file-under-cursor.screen
这与
bind f source /Users/masi/bin/screen/edit-file-under-cursor.screen
我运行代码,因为我的光标位于以下行的开头
vim ~/.zshrc
我得到一个新的缓冲区,这样
替代文字 http://files.getdropbox.com/u/175564/screen-rampion.png
该命令的目的是什么?