My tools setting/configurarion files.
Expose the development tools and settings you are using.
Ubuntu 18.04/20.04
Package update
sudo apt -y update
sudo apt -y upgrade
sudo apt -y autoremoveInstall additional packages
sudo apt -y install \
build-essential \
python3 \
python3-pip \
python3-dev \
vim \
vim-scripts \
screen \
language-pack-ja \
mysql-client \
nkf \
jqAdditional settings
sudo update-locale LANG=ja_JP.UTF8
sudo dpkg-reconfigure tzdata
echo "set bell-style none" >> ~/.inputrc
echo "set visualbell t_vb=" >> ~/.vimrc
echo "export SCREENDIR=$HOME/.screen" >> ~/.bashrc
echo "umask 022" >> ~/.bashrc
echo "alias python=python3" >> ~/.bashrc
echo "alias docker='/mnt/c/Program\ Files/Docker/Docker/resources/bin/docker.exe'" >> ~/.bashrcCreate a symbolic link to make it easier to navigate to a Windows directory
ln -s /mnt/c/Users/[Windows login username]/Documents Documents
ln -s /mnt/c/Users/[Windows login username]/Downloads DownloadsThe default directory display color of WSL Ubuntu is hard to see, so change it.
dircolors -p > ~/.dircolors
Edit the output ~/.dircolors and rewrite the following values
- OTHER_WRITABLE
Changed 01;42 to 01;32. - STICKY_OTHER_WRITABLE
Changed 30;42 to 30;32.
Find the following item in Settings.json and set it to true.
(Since it is a check box on the latest "Settings" screen, you can just turn it on.)
"files.autoGuessEncoding": trueHowever, sometimes the judgment fails, so in that case it is necessary to manually specify the character code and reopen.
- AutoPagerize
- AMP Validator
- Chrome Remote Desktop
- cocopy
- EditThisCookie
- Google translate
- e-Tax AP
- Improve YouTube! (Video & YouTube Tools)🎧
- GoFullPage - Full Page Screen Capture
- Google Mail Checker
- Google Offline Document
- Google Transrate
- Lighthouse
- LINE
- LTTM
- Pegmatite
- Picture-in-Picture Extension (by Google)
- RSS Subscription Extension(by Google)
- Screenshot YouTube
- twitter Image full size button
- Vein: a New Social Reading Service.
- ZenHub for GitHub
- Hatena Bookmark
- Application Launcher for Drive (Google)
- .NET Install Tool for Extension Authors
- Auto Rename Tag
- AWS Toolkit
- Azure Tools
- Azure Account
- Azure Kubernetes Service
- Azure Machine Learning
- Azure Machine Learning - Remote
- Better Haml
- Bicep
- Bridge to Kubernetes
- C/C++
- Code Spell Checker
- Debugger for Java
- Debugger for Microsoft Edge
- Dependency Analytics
- Docker
- Draw.io Integration
- Encode Decode
- Excel to Markdown table
- Excel Viewer
- File Utils
- Git Graph
- GitHub
- GitHub Copilot
- GitHub Copilot Labs
- GitHub Pull Requests and Issues
- GitHub Repositories
- GitLens — Git supercharged
- GlassIt-VSC
- Hasher
- Hex Editor
- Image preview
- IntelliCode
- Japanese Language Pack for Visual Studio Code
- Jupyter
- Jupyter Keymap
- Jupyter Notebook Renderers
- Kubernetes
- Language Support for Java(TM) by Red Hat
- Live Sass Compiler
- Live Server
- Live Share
- Live Share Audio
- Live Share Extension Pack
- Markdown Preview Enhanced
- Markdown Preview Github Styling
- Markdown Preview Mermaid Support
- Material Icon Theme
- Marp for VS Code
- MongoDB for VS Code
- Open to Other Editor Group
- PlantUML
- Power Mode
- Prettier - Code formatter
- Project Manager for Java
- Pylance
- Python
- Remote Development
- Remote Repositories
- REST Book
- REST Client
- SCSS IntelliSense
- SQLite
- Swagger Viewer
- Test Runner for Java
- TSLint
- VSCode Ruby
- vscode-icons
- vscode-reveal
- YAML
Move with Ctrl +, shortcut or File> Preferences> Settings.
- Make VS Code's integrated terminal Git Bash Type terminal.integrated.shell.windows in the search field and edit with settings.json to display the edit screen. Describe the following contents.
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",- Line feed code Type files.eol in the search field and select "\ n" in the drop-down list to change the default line feed code to LF. Or describe the following items in settings.json.
"files.eol": "\n",- Automatic character code judgment Type files.autoGuessEncoding in the search field and select the check box. Or describe the following items in settings.json.
"files.autoGuessEncoding": true,- REST Client If you keep the default, the returned JSON will be garbled if it contains Japanese, so type rest-client.decodeEscapedUnicodeCharacter in the search field and select the check box. Or describe the following items in settings.json.
"rest-client.decodeEscapedUnicodeCharacters": true,- Word separator Punctuation marks are considered as words, so you can use Ctrl+Alt(Opt)+F/B or Alt(Opt)←→ to jump to a punctuation mark. Type editor.wordSeparators in the search field and type "`~!@#$%^&*()-=+[{]}\|;:'",.<>/?、。 " to override it. Or write the following in settings.json
"editor.wordSeparators": "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?、。 ",- Background color of the active editing tab The default is hard to see, so change it. Type "workbench.colorCustomizations" in the search field and write the following items in settings.json.
"workbench.colorCustomizations": {
"tab.activeBackground": "#0184bc"
},Create a key converted from PuTTY format to Openssh format for use with ssh commands.
- Start [PuTTY Gen (PuTTY Key Generator)] from the start menu.
- Load the PuTTY format key file with [File]-[Load private key].
- Select [Conversions]-[Export OpenSSH key].
- Do I have to protect it with a passphrase? A confirmation dialog box will be displayed. Select [Yes].
- Enter the file name and save. For convenience, it is recommended that the extension of the original file name (* .ppk) is .pem.
- Copy the generated key file under
~ / .ssh /.- In case of Windows, if you put the key file other than under
~ /, a connection error will occur. - For Linux, a connection error will occur unless you change the permissions so that only you can read and write after copying.
chmod 600 ~/.ssh/*.pem
- In case of Windows, if you put the key file other than under
- For Gitbash. Below is a copy of WSL's Ubuntu.
- For Windows,
C:\Users\[login user name]is directly under the home directory (~/)
# ~/.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 $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\][GitBash] \u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}[GitBash]: \u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fiAdditional alias settings (Windows Git Bash)
alias cp='cp -i'
alias rm='rm -i'
alias mv='mv -i'
alias crontab='crontab -i'
alias vimdiff='vim -d'
alias view='vim -R'
alias curl='curl -s'
alias ssh='ssh -o ServerAliveInterval=60'
alias jq='jq -C'
alias cdh='cd ~/Documents'
alias cdd='cd ~/Downloads'
alias nostat="egrep -v '/(api/(status|doc)|bootstrap|jquery|ui|signin|public|health_check|HealthCheck::)'"
alias kubelog="kubectl stern -t "
alias kevent="kubectl get events --sort-by='.metadata.creationTimestamp' -A"
alias stern="kubectl-stern --timestamps "
alias aws_completer='/c/Program\ Files/Amazon/AWSCLIV2/aws_completer | 2lf'
alias mongo="mongosh"
#alias kp="kubectl get pods | s2u | 2lf"
#alias kd="kubectl get deploy | s2u | 2lf"
alias kt="kubectl top pods --sort-by=cpu | s2u | 2lf"
alias kcc="kubectl config current-context | s2u | 2lf"
alias tenki="curl https://wttr.in/Chiba"
alias awsmfa='aws-mfa --profile '
alias rehash='. ~/.bashrc'
alias addbom='nkf --overwrite --oc=UTF-8-BOM'
alias uft8conv='nkf --overwrite --oc=UTF-8 -Lu'
alias pwgen='wsl pwgen -y -n -c 16 1'
export LANG="ja_JP.utf8"
export LC_ALL=ja_JP.utf8
export LANG=ja_JP.utf8
export LANGUAGE=ja_JP.utf8
export LC_CTYPE="ja_JP.utf8"
export LC_NUMERIC="ja_JP.utf8"
export LC_TIME="ja_JP.utf8"
export LC_COLLATE="ja_JP.utf8"
export LC_MONETARY="ja_JP.utf8"
export LC_MESSAGES="ja_JP.utf8"
export GOPATH=/home/kabukawa/go
#source ~/.bash_completion.d/kubectl
source ~/.azure/az.completion
export MSYS=winsymlinks:nativestrict
HISTSIZE=1000
HISTFILESIZE=3000
function _compreply_ssh()
{
COMPREPLY=(`cat ~/.ssh/config | grep -i -e '^host' | cut -d " " -f 2 | grep -E "$2"`)
}
complete -F _compreply_ssh ssh
function s2u ()
{
iconv -f CP932 -t UTF-8 | tr -d '\r'
}
function u2s ()
{
iconv -f UTF-8 -t CP932
}
function u2l ()
{
if [ ${#1} -eq 10 ]; then
date --date "@$1" +"%Y-%m-%d %H:%M:%S"
elif [ ${#1} -ge 13 ]; then
date --date "@${1:0:10}.${1:10:3}" +"%Y-%m-%d %H:%M:%S.%3N"
fi
}
function l2u ()
{
date +%s --date "$*"
}
function 2lf ()
{
tr -d "\r"
}
function utc2jst ()
{
date -d "${1} UTC" "+%Y/%m/%d %H:%M:%S"
}
function jst2utc ()
{
TZ=UTC date -d "${1} JST" "+%Y/%m/%d %H:%M:%S"
}
function gip ()
{
curl ifconfig.io -4
curl ifconfig.io -6
}
#alias tree='tree.com'
peco_search_history()
{
local l=$(HISTTIMEFORMAT= history | \
sort -r | sed -E s/^\ *[0-9]\+\ \+// | \
peco --query "$READLINE_LINE")
READLINE_LINE="$l"
READLINE_POINT=${#l}
}
bind -x '"\C-r": peco_search_history'
peco_cdr()
{
local l=$(CWDHISTORY= dirs -v | \
sort -r | sed -E s/^\ *[0-9]\+\ \+// | \
peco --query "$READLINE_LINE")
READLINE_LINE="$l"
READLINE_POINT=${#l}
cd "$l"
}
alias cdr=peco_cdr
toppod()
{
kubectl top pod --use-protocol-buffers --no-headers | s2u | 2lf | \
sort -k3 -n -r | \
head -n 10
}
function ks()
{
kcontext=$(kubectl config get-contexts | s2u | 2lf | \
peco --initial-index=1 --prompt='kubectl config use-context > ' | \
sed -e 's/^\*//' | awk '{print $1}')
clear
if [ -n "$kcontext" ]; then
kubectl config use-context $kcontext
else
kcc
fi
}
function kp()
{
if [ -n "$1" ]; then
kubectl get pods | s2u | 2lf | grep $1
else
kubectl get pods | s2u | 2lf
fi
}
function kd()
{
if [ -n "$1" ]; then
kubectl get deploy | s2u | 2lf | grep $1
else
kubectl get deploy | s2u | 2lf
fi
}
function klogin ()
{
klogin=$(kp | peco --initial-index=1 --prompt='pod login > ' | \
awk '{print $1}')
clear
if [ -n "$klogin" ]; then
kubectl exec -it $klogin -- //bin/bash
fi
}
function distlogin()
{
dcontext=$(wsl --list --quiet | s2u | \
peco --initial-index=0 --prompt='Distribution > ' | \
awk '{print $1}')
clear
if [ -n "$dcontext" ]; then
wsl --distribution $dcontext --cd "~"
fi
}
function ass()
{
acontext=$(az account list --query \
'[?tenantId==`754dd7c9-3d26-46fc-a8cc-91e046d26e1d`].[id, name]' -o tsv | \
s2u | sed -e 's/スポンサー プラン/Sponsor Plans/g' | \
peco --initial-index=0 --prompt='Subscriptuon > ' | awk '{print $1}')
clear
if [ -n "$acontext" ]; then
az account set -s "$acontext"
fi
az account show --query "name" -o tsv
}
function pod-restart()
{
local DEPLOYLIST=`kubectl get deploy`
rcontext=$(echo "${DEPLOYLIST}" | \
peco --initial-index=1 --prompt='kubectl get pods > ' | \
awk '{print $1}')
clear
if [ -n "$rcontext" ]; then
kubectl rollout restart deployment/$rcontext
fi
}
function sql()
{
mcontext=$(ls ~/.mysql/* | \
sed -e 's/.*\///g' | \
peco --initial-index=0 --prompt='mysql > ' | \
awk '{print $1}')
clear
if [ -n "$mcontext" ]; then
mysql --defaults-file=~/.mysql/$mcontext
fi
}
function vpn()
{
vcontext=$(ls -a ~/.vpn/* | \
sed -e 's/.*\///g' | \
peco --initial-index=0 --prompt='vpn > ' | \
awk '{print $1}')
clear
if [ -n "$vcontext" ]; then
rasdial `cat ~/.vpn/$vcontext` | egrep -v '(コマンドは正常に|Binary file)'
fi
}
function mg()
{
gcontext=$(ls -a ~/.mongo/* | \
sed -e 's/.*\///g' | \
peco --initial-index=0 --prompt='mongo > ' | \
awk '{print $1}')
clear
if [ -n "$gcontext" ]; then
mongo `cat ~/.mongo/$gcontext`
fi
}
function _compreply_awsprofile()
{
COMPREPLY=(`cat ~/.aws/config | \
grep -i -e '^\[' | \
sed -e 's/\[//g' -e 's/\]//g' | \
cut -d " " -f 2 | grep -E "$2"`)
}
complete -F _compreply_awsprofile awsmfa
function awsssm()
{
local INSTANCES=`awsec2 ${1}`
SSM_TARGET_HOST=$(echo "${INSTANCES}" | \
peco --initial-index=0 --prompt='ssm > ' | \
awk '{print $1}')
if [ -n "${SSM_TARGET_HOST}" ]; then
chcp.com 65001
aws ssm start-session --profile ${1} --target ${SSM_TARGET_HOST}
chcp.com 932
fi
}
complete -F _compreply_awsprofile awsssm
function awspfrds()
{
local INSTANCES=`awsec2 ${1}`
SSM_TARGET_HOST=$(echo "${INSTANCES}" | \
peco --initial-index=0 --prompt='ssm > ' | \
awk '{print $1}')
local DBINSTANCES=`awsrds ${1}`
RDS_TARGET_HOST=$(echo "${DBINSTANCES}" | \
peco --initial-index=0 --prompt='ssm > ' | \
awk '{print $1}')
if [ -n "${SSM_TARGET_HOST}" ]; then
aws ssm start-session --profile ${1} --target ${SSM_TARGET_HOST} \
--cli-read-timeout 0 \
--cli-connect-timeout 0 \
--document-name AWS-StartPortForwardingSessionToRemoteHost \
--parameters "{\"host\":[\"${RDS_TARGET_HOST}\"],\"portNumber\":[\"3306\"], \"localPortNumber\":[\"13306\"]}"
fi
}
complete -F _compreply_awsprofile awspfrds
function awslogtail()
{
local LOGGROUPS=`awsloggroups ${1}`
TARGET_LOGGROUP=$(echo "${LOGGROUPS}" | \
peco --initial-index=0 --prompt='log grpups > ' | \
awk '{print $1}')
if [ -n "${TARGET_LOGGROUP}" ]; then
aws logs --profile ${1} tail --format short --since 60m --follow ${TARGET_LOGGROUP}
fi
}
complete -F _compreply_awsprofile awslogtail
function awsec2 ()
{
aws ec2 describe-instances \
--profile ${1} \
--query 'Reservations[].Instances[].{ID:InstanceId, Name:Tags[?Key==`Name`] | [0].Value, State:State.Name}' \
--output text | column -t
}
complete -F _compreply_awsprofile awsec2
function awsrds ()
{
aws rds describe-db-instances \
--profile ${1} \
--query 'DBInstances[].{ID:DBInstanceIdentifier, Class:DBInstanceClass, Address:Endpoint.Address, Name:TagList[?Key==`Name`] | [0].Value, State:DBInstanceStatus}' \
--output text | column -t
}
complete -F _compreply_awsprofile awsrds
function awssecrets ()
{
for NAME in `aws secretsmanager list-secrets \
--profile ${1} \
--query "SecretList[].Name" \
--output text | 2lf`;
do
echo ${NAME}
aws secretsmanager get-secret-value \
--profile ${1} \
--secret-id ${NAME} | \
jq -r ".SecretString" | jq ;
done
}
complete -F _compreply_awsprofile awssecrets
function awsloggroups ()
{
aws logs describe-log-groups\
--profile ${1} \
--query 'logGroups[].logGroupName' \
--output text | sed -e 's/\t/\n/g' | grep ^dxp | grep ecm
}
complete -F _compreply_awsprofile awsloggroups
function ecs_info ()
{
CLUSTOR=`aws ecs \
--profile ${1} list-clusters | \
jq -r .clusterArns[] | grep ecm`
TASK_ID_LIST=`aws ecs --profile ${1} list-tasks \
--cluster ${CLUSTOR} \
--query "taskArns" \
--output text`
for TASK_ID_ARN in ${TASK_ID_LIST}
do
TASK_ID=`echo "${TASK_ID_ARN}" | sed -e 's/.*\///'`
CONTAINER=`aws ecs --profile ${1} describe-tasks \
--cluster ${CLUSTOR} \
--tasks ${TASK_ID} \
--query 'tasks[].containers[].name' \
--output text`
printf "%s\t%s\t%s\n" ${TASK_ID} ${CONTAINER} ${CLUSTOR}
done
}
function ecslogin()
{
local TASKLIST=`ecs_info ${1}`
TASK_INFOS=$(echo "${TASKLIST}" | \
peco --initial-index=0 --prompt='ecs tasks > ' | \
awk '{print $0}')
if [ -n "${TASK_INFOS}" ]; then
#aws logs --profile ${1} tail --format short --since 60m --follow ${TARGET_LOGGROUP}
clear
CLUSTOR=`echo ${TASK_INFOS} | cut -f3 -d' '`
TASK_ID=`echo ${TASK_INFOS} | cut -f1 -d' '`
CONTAINER=`echo ${TASK_INFOS} | cut -f2 -d' '`
aws ecs execute-command \
--profile ${1} \
--cluster ${CLUSTOR} \
--task ${TASK_ID} \
--container ${CONTAINER} \
--interactive \
--command "//bin/bash"
fi
}
complete -F _compreply_awsprofile ecslogin
function dockerip()
{
dcontext=$(docker ps | grep -v CONTAINER | sed -e 's/ */ /g' | cut -f1,2 -d" " | \
peco --initial-index=0 --prompt='container > ' | \
awk '{print $1}')
#clear
if [ -n "$dcontext" ]; then
docker inspect $dcontext | grep IPAddress
fi
}
complete -C aws_completer aws
source <(kubectl completion bash)- For Windows,
C:\Users\[login user name]is directly under the home directory (~/) - Replace {username} and {email address} with your own.
[user]
name = {username}
email = {email address}
[credential "helperselector"]
selected = <no helper>
[diff]
tool = vimdiff
[difftool]
prompt = false
[merge]
tool = vimdiff
[mergetool]
prompt = false
[difftool "sourcetree"]
cmd = 'C:/Program Files/WinMerge/WinMergeU.exe' \"$LOCAL\" \"$REMOTE\"
[mergetool "sourcetree"]
cmd = 'C:/Program Files/WinMerge/WinMergeU.exe' -e -ub -fr -ar -wl -wm -dl base -dm remote -dr local $BASE $REMOTE $LOCAL -o $MERGED
trustExitCode = true
[core]
quotepath = false- Replace {username} and {email address} with your own.
[user]
name = {username}
email = {email address}
[diff]
tool = vimdiff
[difftool]
prompt = false
[merge]
tool = vimdiff
[mergetool]
prompt = false- For Windows,
C:\Users\[login user name]is directly under the home directory (~ /)
colorscheme onehalfdark
syntax on
set hlsearch
set ts=4
set nowrap
set belloff=all
set laststatus=2
set showmatch
set cursorline
set fileformats=unix,dos,mac
set encoding=utf-8
set fileencodings=iso-2022-jp,cp932,sjis,euc-jp,utf-8
highlight CursorLine cterm=underline ctermfg=NONE ctermbg=NONE
highlight CursorLine gui=underline guifg=NONE guibg=NONE
highlight StatusLine term=none cterm=none ctermfg=black ctermbg=darkbluedefutf8 on
defencoding utf8
encoding utf8 utf8
startup_message off
vbell off
#Color
#If orange turns red, screen may not support 256 colors
# FYI: https://qiita.com/trapple/items/8ad1b0a7c4fa5b8341b0
# $ brew tap homebrew/dupes
# $ brew install screen
defbce on
term xterm-256color
# Status line
hardstatus alwayslastline "%{= cd} %-w%{= wk} %n %t* %{-}%+w %= LoadAVG [%l] "
# Escape key
#escape ^Tt
#Mouse scroll
termcapinfo xterm* ti@:te@
# Number of scroll lines
defscrollback 10000
#Clear buffers such as vim, less and tig at the end
altscreen on
#Default shell
shell $SHELL- For Windows,
C:\Users\[login user name]is directly under the home directory (~/) - For Linux, change the permissions under
~/.ssh/so that only you can read and write. - Replace {username} and {keyfilename} with your own.
## develop
Host {host name}
HostName {IP address}
User {user name}
IdentityFile ~/.ssh/{key file name}- If you want to prompt the environment name after login
## develop
Host {host name}
HostName {IP address}
User {user name}
IdentityFile ~/.ssh/{key file name}
RequestTTY yes
RemoteCommand PS1="\[\e[1;32m\][\u@\h \w] [environment name] $ \[\e[m\]" bash --login[client]
host={hostname}
user={username}
password={password}
port=3306
database={schema name}