summaryrefslogtreecommitdiff
path: root/dot_bashrc
diff options
context:
space:
mode:
Diffstat (limited to 'dot_bashrc')
-rw-r--r--dot_bashrc80
1 files changed, 80 insertions, 0 deletions
diff --git a/dot_bashrc b/dot_bashrc
new file mode 100644
index 0000000..7308301
--- /dev/null
+++ b/dot_bashrc
@@ -0,0 +1,80 @@
1# If not running interactively, don't do anything
2[[ $- != *i* ]] && return
3
4alias ls='ls -p --color=auto'
5alias ll='ls -Alh'
6alias cz='chezmoi'
7alias e="emacsclient --no-wait --quiet"
8alias ee="emacsclient --no-wait --quiet --create-frame"
9alias cmatrix="cmatrix -C blue"
10
11PS1='\[\e[36m\][\[\e[34m\]\u\[\e[36m\]@\[\e[34m\]\h\[\e[36m\]:\[\e[34m\]\w\[\e[36m\]] \[\e[95m\]\$\[\e[0m\] '
12
13# Update window size after every command
14shopt -s checkwinsize
15
16# Prevent file overwrite on stdout redirection
17# Use `>|` to force redirection to an existing file
18set -o noclobber
19
20# Turn on recursive globbing (enables ** to recurse all directories)
21shopt -s globstar
22
23# Automatically trim long paths in the prompt (requires Bash 4.x)
24PROMPT_DIRTRIM=2
25
26# Perform file completion in a case insensitive fashion
27bind "set completion-ignore-case on"
28
29# Treat hyphens and underscores as equivalent
30bind "set completion-map-case on"
31
32# Display matches for ambiguous patterns at first tab press
33bind "set show-all-if-ambiguous on"
34
35# Immediately add a trailing slash when autocompleting symlinks to directories
36bind "set mark-symlinked-directories on"
37
38# Append to the history file, don't overwrite it
39shopt -s histappend
40
41# Save multi-line commands as one command
42# shopt -s cmdhist
43
44# Record each line as it gets issued
45PROMPT_COMMAND='history -a'
46
47# Huge history. Doesn't appear to slow things down, so why not?
48HISTSIZE=500000
49HISTFILESIZE=100000
50
51# Avoid duplicate entries
52# HISTCONTROL="erasedups:ignoreboth"
53
54# Don't record some commands
55export HISTIGNORE="&:[ ]*:exit:bg:fg:history:clear"
56export HISTFILE="$XDG_CACHE_HOME/.bash_history"
57
58# Use standard ISO 8601 timestamp
59# %F equivalent to %Y-%m-%d
60# %T equivalent to %H:%M:%S (24-hours format)
61HISTTIMEFORMAT='%F %T '
62
63# Prepend cd to directory names automatically
64shopt -s autocd
65# Correct spelling errors during tab-completion
66shopt -s dirspell
67# Correct spelling errors in arguments supplied to cd
68shopt -s cdspell
69
70# This defines where cd looks for targets
71# Add the directories you want to have fast access to, separated by colon
72# Ex: CDPATH=".:~:~/projects" will look for targets in the current working directory, in home and in the ~/projects folder
73CDPATH="."
74
75# This allows you to bookmark your favorite places across the file system
76# Define a variable containing a path and you will be able to cd into it regardless of the directory you're in
77shopt -s cdable_vars
78# export dotfiles="$HOME/dotfiles"
79
80export GPG_TTY=$(tty)