-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbashrc
More file actions
72 lines (60 loc) · 1.69 KB
/
bashrc
File metadata and controls
72 lines (60 loc) · 1.69 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
if [ -z $SSH_CONNECTION ];
then
fortune
echo
fi
alias ldir="ls -l|grep ^d"
alias mnt="mount|column -t"
alias rm="rm -i"
alias pcp="perl /home/ravi/workspace/linux-next/scripts/checkpatch.pl"
alias utc="TZ='UTC' date"
alias errno="cpp -dM /usr/include/errno.h | grep 'define E' | sort -n -k 3"
alias lock="qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock"
alias dropboxpull='f() {
local skip_dry_run=false
if [[ $1 == "--no-dry-run" ]]; then
skip_dry_run=true
shift
fi
if ! $skip_dry_run; then
echo "===== DRY RUN: What would happen ====="
rclone sync Dropbox: ~/Dropbox -P --dry-run --create-empty-src-dirs
echo "====================================="
fi
if $skip_dry_run || { read -p "Proceed with actual sync? [y/N] " confirm && [[ $confirm =~ ^[Yy]$ ]]; }; then
echo "Starting real sync..."
rclone sync Dropbox: ~/Dropbox -P --create-empty-src-dirs
else
echo "Sync canceled."
fi
}; f'
alias dropboxpush='f() {
local skip_dry_run=false
if [[ $1 == "--no-dry-run" ]]; then
skip_dry_run=true
shift
fi
if ! $skip_dry_run; then
echo "===== DRY RUN: What would happen (Local → Remote) ====="
rclone sync ~/Dropbox Dropbox: -P --dry-run
echo "========================================================"
fi
if $skip_dry_run || { read -p "Proceed with actual sync to remote? [y/N] " confirm && [[ $confirm =~ ^[Yy]$ ]]; }; then
echo "Starting real sync to remote..."
rclone sync ~/Dropbox Dropbox: -P
else
echo "Sync canceled."
fi
}; f'
export PATH=$PATH:"/home/ravi/bin"
export EDITOR=vim
#coloured man pages
export MANPAGER="/usr/bin/most -s"
ulimit -c unlimited
shopt -s cdspell