-
Notifications
You must be signed in to change notification settings - Fork 1
/
initbashrc
executable file
·57 lines (57 loc) · 2.55 KB
/
initbashrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
# vim: set shiftwidth=4 tabstop=4 noexpandtab nosmarttab:
cat >>$HOME/.bashrc <<- 'EOF'
## Note: bash login workflow
## 1. /etc/profile
## 1a. /etc/bash.bashrc [Debian]
## 2. ~/.bash_profile || ~/.bash_login || ~/.profile
## 2a. ~/.bashrc
## 2b. /etc/bashrc [Redhat]
## Note: bash shell start workflow
## 1. /etc/bash.bashrc [Debian]
## 2. ~/.bashrc
## 2a. /etc/bashrc [Redhat]
## Note: bash logout
## 1. ~/.bash_logout
##
[ -z "$PS1" ] && return # return if non-interactive-mode.
[ -z "$LANG" ] && export LANG=ja_JP.UTF-8 # for macOS SSH
## un-comment if you need.
#HISTSIZE=2000
#HISTFILESIZE=2000
#alias poff='sudo poweroff'
#alias boot='sudo reboot'
#alias diff='diff --color=auto'
#alias mount-clone='sudo mount /dev/sda2 /mnt/clone && lsblk'
#alias umount-clone='sudo umount /mnt/clone && lsblk'
#alias tailss='tailscale status'
#alias tailup='tailscale up --ssh'
#alias taildn='tailscale down'
#alias start='xdg-open'
#export EDITOR=vim
#export GIT_EDITOR=vim
#export PAGER=lv
#HISTTIMEFORMAT='%F %T '
#HISTCONTROL=ignoreboth
#HISTIGNORE='?:??:???:exit'
#alias .a='source "$HOME/bin/myaliases"'
#alias .b='source "$HOME/.bashrc"'
#alias .f='source "$HOME/bin/myfunctions"'
#source "$HOME/bin/myaliases"
#source "$HOME/bin/myfunctions"
#GIT_PS1_SHOWUPSTREAM=1
#GIT_PS1_SHOWDIRTYSTATE=1
## MINGW64/GitBush: \[\033]0;$TITLEPREFIX:$PWD\007\]\n\[\033[32m\]\u@\h \[\033[35m\]$MSYSTEM \[\033[33m\]\w\[\033[36m\]`__git_ps1`\[\033[0m\]\n$
## Ubuntu18.04LTS: \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$
## Ubuntu22.04LTS: \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$
## RaspbianBuster: \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \$\[\033[00m\]
## Cygwin64: \[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$
## MacOS X Darwin: \h:\W \u\$
#PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' ## colored for macOS
#[ -z `type -t __git_ps1` ] || PS1=${PS1/]\\w/]\\w\`__git_ps1\`} ## add __git_ps1 after PWD
#[ -z `type -t __git_ps1` ] || PS1=${PS1/]\\w/]\\w\\[\\033[36m\\]\`__git_ps1\`\\[\\033[0m\\]} ## add colored __git_ps1 after PWD
#[ -z `type -t lsb_release` ] || PS1=\\033[34m\\]`lsb_release -sd`*${PS1} ## add distribution name
#PS1=${PS1/\\$/\\n\\$} ## add newline before $
#tabs -4
#PROMPT_COMMAND=jobs
EOF