bashrc.br: replace ls '-a' with '-A' in aliases, add fdiff function
This commit is contained in:
@@ -177,9 +177,9 @@ alias systemctl="systemctl --no-pager --full"
|
|||||||
alias l='ls -F'
|
alias l='ls -F'
|
||||||
alias ls='ls -F'
|
alias ls='ls -F'
|
||||||
alias l1='ls -1F'
|
alias l1='ls -1F'
|
||||||
alias la='ls -aF'
|
alias la='ls -AF'
|
||||||
alias ll='ls -lF'
|
alias ll='ls -lF'
|
||||||
alias lla='ls -laF'
|
alias lla='ls -lAF'
|
||||||
alias ldl='ls -l | grep ^d'
|
alias ldl='ls -l | grep ^d'
|
||||||
[[ -v BASH_ALIASES[lrt] ]] && unalias lrt
|
[[ -v BASH_ALIASES[lrt] ]] && unalias lrt
|
||||||
lrt() {
|
lrt() {
|
||||||
@@ -210,8 +210,25 @@ alias hlll="history" # all history
|
|||||||
# user temp directory
|
# user temp directory
|
||||||
export USERTMP=~/tmp
|
export USERTMP=~/tmp
|
||||||
|
|
||||||
# :)
|
# misc aliases
|
||||||
alias fuck='sudo $(history -p \!\!)'
|
alias fuck='sudo $(history -p \!\!)'
|
||||||
|
alias diff='diff -u'
|
||||||
|
# fdiff() - compare two files with same name
|
||||||
|
# parameters:
|
||||||
|
# $1: first file
|
||||||
|
# $2: second file directory
|
||||||
|
#
|
||||||
|
# fdiff will compare (diff) $1 with a file of basename $1 in $2 directory.
|
||||||
|
# Examples:
|
||||||
|
# % fdiff .bashrc ~ # compare .bashrc with ~/.bashrc
|
||||||
|
# % fdiff /tmp/.bashrc /home/br/ # compare /tmp/.bashrc with /home/br/.bashrc
|
||||||
|
|
||||||
|
fdiff () {
|
||||||
|
local file1="$1" # file to compare
|
||||||
|
local file2="$2/${file1##*/}" # file2 with path
|
||||||
|
|
||||||
|
diff "$file1" "$file2"
|
||||||
|
}
|
||||||
|
|
||||||
# I am used to rehash...
|
# I am used to rehash...
|
||||||
# rehash - manage bash's remembered commands paths
|
# rehash - manage bash's remembered commands paths
|
||||||
|
@@ -39,6 +39,7 @@ alias aoc="cd ~/dev/advent-of-code/2022/; . ../env.sh" # Advent of Code
|
|||||||
alias wchess="cd ~/dev/www/com.raoult/devs/chess" # raoult.com chess
|
alias wchess="cd ~/dev/www/com.raoult/devs/chess" # raoult.com chess
|
||||||
alias chess="cd ~/dev/brchess; . env.sh" # brchess
|
alias chess="cd ~/dev/brchess; . env.sh" # brchess
|
||||||
alias tools="cd ~/dev/tools" # tools
|
alias tools="cd ~/dev/tools" # tools
|
||||||
|
alias brlib="cd ~/dev/tools/c/brlib" # brlib dir/repo
|
||||||
|
|
||||||
# Indent style for emacs
|
# Indent style for emacs
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
|
Reference in New Issue
Block a user