-
Notifications
You must be signed in to change notification settings - Fork 0
/
bashrc
39 lines (35 loc) · 1.54 KB
/
bashrc
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
# Command history tweaks:
# - Append history instead of overwriting
# when shell exits.
# - When using history substitution, do not
# exec command immediately.
# - Do not save to history commands starting
# with space.
# - Do not save duplicated commands.
shopt -s histappend
shopt -s histverify
export HISTCONTROL=ignoreboth
# Default command line prompt.
PROMPT_DIRTRIM=2
PS1='\[\e[0;32m\]\w\[\e[0m\] \[\e[0;97m\]\$\[\e[0m\] '
# Handles nonexistent commands.
# If user has entered command which invokes non-available
# utility, command-not-found will give a package suggestions.
if [ -x /data/data/com.termux/files/usr/libexec/termux/command-not-found ]; then
command_not_found_handle() {
/data/data/com.termux/files/usr/libexec/termux/command-not-found "$1"
}
fi
[ -r /data/data/com.termux/files/usr/share/bash-completion/bash_completion ] && . /data/data/com.termux/files/usr/share/bash-completion/bash_completion
# It will run docker.sh script to start docker daemon
alias ds="sudo bash /data/data/com.termux/files/usr/opt/quine/scripts/start-docker.sh"
# It will run network.sh script for setting network for docker
alias ns="sudo bash /data/data/com.termux/files/usr/opt/quine/scripts/setup-docker-networking.sh"
# Now you can run docker command without typing sudo
alias docker="sudo docker"
# Point docker-compose at the right socket
alias docker-compose="sudo DOCKER_HOST=unix:///data/docker/run/docker.sock docker-compose"
# To clear working termux tab
alias cl="clear"
# To exit from termux app quickly
alias q="exit"