标签:mac
bash自动补全:https://my.oschina.net/tsl0922/blog/178775
xxxxx-MacBook-Air:~ xxxxxx$ cat .bashrc [ -r "~/.bash_profile" ] && . "~/.bash_profile" # 配置 ll 等命令 alias l=‘ls -alFG‘ alias la=‘ls -AFG‘ alias ll=‘ls -lAhFG‘ # 配置默认 python 环境 #source ~/.py27/bin/activate # ssh scp 自动补全 _complete_ssh_hosts () { COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" comp_ssh_hosts=`awk ‘{split($1,aliases,","); if (aliases[1] !~ /^\[/) print aliases[1]}‘ ~/.ssh/known_hosts ; cat ~/.ssh/config | grep "^Host " | awk ‘{print $2}‘ ` COMPREPLY=( $(compgen -W "${comp_ssh_hosts}" -- $cur)) return 0 } complete -F _complete_ssh_hosts ssh complete -F _complete_ssh_hosts scp # 配置历史记录 size HISTSIZE=1000 HISTFILESIZE=2000
本文出自 “the-way-to-cloud” 博客,请务必保留此出处http://iceyao.blog.51cto.com/9426658/1872865
标签:mac
原文地址:http://iceyao.blog.51cto.com/9426658/1872865