diff options
| author | Hsieh Chin Fan <pham@topo.tw> | 2024-12-11 13:07:59 +0800 |
|---|---|---|
| committer | Hsieh Chin Fan <pham@topo.tw> | 2024-12-11 13:07:59 +0800 |
| commit | 435ff5b8088e14195d9c054b394c501cfba129ec (patch) | |
| tree | 800fb19c06f4b65951c8b6e51a3eea20a4427743 | |
| parent | 7edad033c56b6c554edacb5858fdecdaf53854f6 (diff) | |
Update
| -rw-r--r-- | .unremovable | 2 | ||||
| -rw-r--r-- | alias | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/.unremovable b/.unremovable new file mode 100644 index 0000000..8917657 --- /dev/null +++ b/.unremovable | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | Maildir | ||
| 2 | log | ||
| @@ -93,6 +93,15 @@ vp() { | |||
| 93 | # }}} | 93 | # }}} |
| 94 | # UNIX {{{ | 94 | # UNIX {{{ |
| 95 | 95 | ||
| 96 | rm() { | ||
| 97 | target=${@: -1} | ||
| 98 | list=~/helper/.unremovable | ||
| 99 | if [[ $@ =~ '-rf' ]] && [ -f "${list}" ]; then | ||
| 100 | grep target $list && echo target unremovable && exit 1 | ||
| 101 | fi | ||
| 102 | |||
| 103 | /bin/rm $@ | ||
| 104 | } | ||
| 96 | config(){ cd ~/.config/$1; } | 105 | config(){ cd ~/.config/$1; } |
| 97 | alias sound="echo -ne '\a'" | 106 | alias sound="echo -ne '\a'" |
| 98 | alias hg='history | grep' | 107 | alias hg='history | grep' |
| @@ -340,6 +349,7 @@ else | |||
| 340 | alias v='vim' | 349 | alias v='vim' |
| 341 | fi | 350 | fi |
| 342 | alias vu='vim -u NONE' | 351 | alias vu='vim -u NONE' |
| 352 | alias sv='sudo vim' | ||
| 343 | alias vr='vim -R' | 353 | alias vr='vim -R' |
| 344 | # Edit last file | 354 | # Edit last file |
| 345 | alias vl="vim -c 'norm '" | 355 | alias vl="vim -c 'norm '" |