我正在尝试访问剪贴板,但是当我source ~/.bashrc 在终端中输入时出现此错误:
bash: /home/taran/.bashrc: line 2: syntax error near unexpected token ('
bash: /home/taran/.bashrc: line 2:alias pbpaste='xclip -selection
clipboard -o'# ~/.bashrc: executed by bash(1) for non-login shells
Run Code Online (Sandbox Code Playgroud)
我尝试在Gary Woodfine's answer to Command Line Clipboard Access 中做教程。
的输出cat ~/.bashrc是:
alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- …Run Code Online (Sandbox Code Playgroud)