zoukankan      html  css  js  c++  java
  • Mac下CoreShell使用lrzsz命令

    • Mac下Core Shell 使用lrzsz命令,上传,下载文件
    • 新增~/.bashrc_Core_Shell
    # Bash support for Core Shell, reference: /etc/bashrc_Apple_Terminal on macOS
    
    # Report Working Directory
    #
    # Tell the Core Shell about the current working directory at each prompt.
    
    if [ -z "$INSIDE_EMACS" ]; then
        update_coreshell_cwd() {
            # Identify the directory using a "file:" scheme URL, including
            # the host name to disambiguate local vs. remote paths.
    
            # Percent-encode the pathname.
            local url_path=''
            {
                # Use LC_CTYPE=C to process text byte-by-byte. Ensure that
                # LC_ALL isn't set, so it doesn't interfere.
                local i ch hexch LC_CTYPE=C LC_ALL=
                for ((i = 0; i < ${#PWD}; ++i)); do
                    ch="${PWD:i:1}"
    
                    if [[ "$ch" =~ [/._~A-Za-z0-9-] ]]; then
                        url_path+="$ch"
                    else
                        printf -v hexch "%02X" "'$ch"
                        # printf treats values greater than 127 as
                        # negative and pads with "FF", so truncate.
                        url_path+="%${hexch: -2:2}"
                    fi
                done
            }
    
            if [ -n "$TMUX" ]; then
                printf 'ePtmux;ee]7;%sae\' "file://$HOSTNAME$url_path"
            else
                printf 'e]7;%sa' "file://$HOSTNAME$url_path"
            fi
        }
    
        PROMPT_COMMAND="update_coreshell_cwd${PROMPT_COMMAND:+; $PROMPT_COMMAND}"
    fi
    
    • 再执行如下命令
    ~/.bashrc_Core_Shell && grep -qs ".bashrc_Core_Shell" ~/.bash_profile || echo $'
    [[ -n "$SSH_TTY" || -n "$SSH_CONNECTION" ]] && [ -r "$HOME/.bashrc_Core_Shell" ] && . "$HOME/.bashrc_Core_Shell"' >> ~/.bash_profile
    
  • 相关阅读:
    在Ajax中将数组转换成字符串(0517-am)
    Json,Ajax(0516)
    JQUERY的应用
    php 之 PDO数据访问抽象层(0513)
    php 之 房屋租赁练习(0509)
    MySQL 高级查询
    MySQL简单查询
    MySQL语句
    php 之 查询 投票练习(0508)
    linux查看java jdk jre安装路径和设置环境变量
  • 原文地址:https://www.cnblogs.com/xujunkai/p/14673292.html
Copyright © 2011-2022 走看看