1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-04-26 17:33:24 -07:00

Compare commits

...

5 Commits

4 changed files with 60 additions and 55 deletions

View File

@ -891,211 +891,211 @@ return 0, ignoring arguments.
append a directory to `$PATH` if it isn't already present.
### [fils (-shrc)](/home/-shrc#L78)
### [fils (-shrc)](/home/-shrc#L81)
(GNU du) display human-friendly filesizes for the files in a directory.
### [lsa (-shrc)](/home/-shrc#L79)
### [lsa (-shrc)](/home/-shrc#L82)
(GNU ls) list files with directories and dotfiles ordered first.
### [perlu (-shrc)](/home/-shrc#L80)
### [perlu (-shrc)](/home/-shrc#L83)
invoke perl expecting files with UTF-8 encoding.
### [rgn (-shrc)](/home/-shrc#L81)
### [rgn (-shrc)](/home/-shrc#L84)
invoke ripgrep without respecting `.gitignore` files.
### [cms (-shrc)](/home/-shrc#L82)
### [cms (-shrc)](/home/-shrc#L85)
invoke cryptominisat5 with less noise.
### [curls (-shrc)](/home/-shrc#L83)
### [curls (-shrc)](/home/-shrc#L86)
invoke curl with less noise.
### [get (-shrc)](/home/-shrc#L87)
### [get (-shrc)](/home/-shrc#L91)
retrieve the most recent files from the default branch of a git repository, and not much else.
### [gs (-shrc)](/home/-shrc#L88)
### [gs (-shrc)](/home/-shrc#L92)
invoke git's status subcommand.
**TODO:** consider renaming because gs(1) already exists.
### [gd (-shrc)](/home/-shrc#L90)
### [gd (-shrc)](/home/-shrc#L94)
invoke git's diff subcommand with fewer lines of context.
### [gds (-shrc)](/home/-shrc#L91)
### [gds (-shrc)](/home/-shrc#L95)
display difference stats from git.
### [gl (-shrc)](/home/-shrc#L92)
### [gl (-shrc)](/home/-shrc#L96)
invoke git's log subcommand with a single line per commit.
**TODO:** consider renaming because [gl(1)](https://github.com/gitless-vcs/gitless) already exists.
### [glo (-shrc)](/home/-shrc#L94)
### [glo (-shrc)](/home/-shrc#L98)
navigate git's commit tree succinctly.
### [g1 (-shrc)](/home/-shrc#L95)
### [g1 (-shrc)](/home/-shrc#L99)
display the most recent git commit.
### [gr (-shrc)](/home/-shrc#L96)
### [gr (-shrc)](/home/-shrc#L100)
display remote git repositories verbosely.
### [gb (-shrc)](/home/-shrc#L97)
### [gb (-shrc)](/home/-shrc#L101)
display the current git branch.
**NOTE:** there also exists a gb(1) program provided by
the *gb* package that i don't use.
### [gdp (-shrc)](/home/-shrc#L100)
### [gdp (-shrc)](/home/-shrc#L104)
invoke `gd` to diff a commit from its parent. the commit defaults to "HEAD".
### [revend (-shrc)](/home/-shrc#L110)
### [revend (-shrc)](/home/-shrc#L114)
reverse the 4-byte endianness of a single file. *this is an in-place operation!*
### [clone (-shrc)](/home/-shrc#L111)
### [clone (-shrc)](/home/-shrc#L115)
invoke rsync suitably for creating virtually indistinguishable copies of files.
### [aligntabs (-shrc)](/home/-shrc#L112)
### [aligntabs (-shrc)](/home/-shrc#L116)
align tab-delimited fields in stdin.
### [crawla (-shrc)](/home/-shrc#L113)
### [crawla (-shrc)](/home/-shrc#L117)
play Dungeon Crawl: Stone Soup through ssh on the akrasiac server.
### [crawlz (-shrc)](/home/-shrc#L114)
### [crawlz (-shrc)](/home/-shrc#L118)
play Dungeon Crawl: Stone Soup through ssh on the develz server.
### [eahead (-shrc)](/home/-shrc#L116)
### [eahead (-shrc)](/home/-shrc#L120)
deprecated name for [`ea head`.](#ea)
### [eaget (-shrc)](/home/-shrc#L117)
### [eaget (-shrc)](/home/-shrc#L121)
deprecated name for [`ea get`.](#ea)
### [eaput (-shrc)](/home/-shrc#L118)
### [eaput (-shrc)](/home/-shrc#L122)
deprecated name for [`ea put`.](#ea)
### [eamove (-shrc)](/home/-shrc#L119)
### [eamove (-shrc)](/home/-shrc#L123)
deprecated name for [`ea move`.](#ea)
### [eacopy (-shrc)](/home/-shrc#L120)
### [eacopy (-shrc)](/home/-shrc#L124)
deprecated name for [`ea copy`.](#ea)
### [eadelete (-shrc)](/home/-shrc#L121)
### [eadelete (-shrc)](/home/-shrc#L125)
deprecated name for [`ea delete`.](#ea)
### [eamv (-shrc)](/home/-shrc#L122)
### [eamv (-shrc)](/home/-shrc#L126)
invoke [`ea move`.](#ea)
### [eacp (-shrc)](/home/-shrc#L123)
### [eacp (-shrc)](/home/-shrc#L127)
invoke [`ea copy`.](#ea)
### [earm (-shrc)](/home/-shrc#L124)
### [earm (-shrc)](/home/-shrc#L128)
invoke [`ea delete`.](#ea)
### [ll (-shrc)](/home/-shrc#L126)
### [ll (-shrc)](/home/-shrc#L130)
list files verbosely, fancily, ordered, but not recursively.
### [diff (-shrc)](/home/-shrc#L135)
### [diff (-shrc)](/home/-shrc#L139)
use git's diff subcommand for general diffing.
### [gc (-shrc)](/home/-shrc#L136)
### [gc (-shrc)](/home/-shrc#L140)
columnize text by using git's column subcommand.
**TODO:** consider renaming because gc(1) already exists.
### [counts (-shrc)](/home/-shrc#L138)
### [counts (-shrc)](/home/-shrc#L142)
count files in the current directory, including files found recursively.
### [exts (-shrc)](/home/-shrc#L139)
### [exts (-shrc)](/home/-shrc#L143)
count and sort file extensions in the current directory, including files found recursively.
### [nocom (-shrc)](/home/-shrc#L140)
### [nocom (-shrc)](/home/-shrc#L144)
strip single-line C-like and shell-like comments.
### [jrep (-shrc)](/home/-shrc#L141)
### [jrep (-shrc)](/home/-shrc#L145)
extract strings comprised of basic ASCII or Japanese codepoints.
### [bomb (-shrc)](/home/-shrc#L142)
### [bomb (-shrc)](/home/-shrc#L146)
add a Byte-Order Mark to a file.
### [cleanse (-shrc)](/home/-shrc#L143)
### [cleanse (-shrc)](/home/-shrc#L147)
strip unprintable and non-ASCII characters.
### [unwrap (-shrc)](/home/-shrc#L144)
### [unwrap (-shrc)](/home/-shrc#L148)
join paragraphs into one line each.
### [double (-shrc)](/home/-shrc#L145)
### [double (-shrc)](/home/-shrc#L149)
print every line twice. <br/> print every line twice.
**NOTE:** there also exists a double(1) program provided by
the *plotutils* package that i don't use.
### [join2 (-shrc)](/home/-shrc#L148)
### [join2 (-shrc)](/home/-shrc#L152)
join every other line.
### [katagana (-shrc)](/home/-shrc#L149)
### [katagana (-shrc)](/home/-shrc#L153)
convert katakana codepoints to their equivalent hiragana.
this is occasionally useful when translating [debug text from ancient games.](https://tcrf.net/)
### [picky (-shrc)](/home/-shrc#L151)
### [picky (-shrc)](/home/-shrc#L155)
list pacman packages that were manually installed and are not in some common package groups.
this list can be used to assist later reinstalls.
### [unused (-shrc)](/home/-shrc#L154)
### [unused (-shrc)](/home/-shrc#L158)
list pacman packages that weren't installed explicitly and don't satisfy any dependencies.
this list can be used to free up some disk space.
### [makepkgf (-shrc)](/home/-shrc#L157)
### [makepkgf (-shrc)](/home/-shrc#L161)
make the freakin' package!
### [rakef (-shrc)](/home/-shrc#L158)
### [rakef (-shrc)](/home/-shrc#L162)
make the freakin' gem!
### [pl (-shrc)](/home/-shrc#L160)
### [pl (-shrc)](/home/-shrc#L164)
print each argument on its own line.

View File

@ -26,7 +26,10 @@ ADDPATH() { ### @- append a directory to `$PATH` if it isn't already present.
printf 'ADDPATH: path does not exist: %s\n' "$1" >&2
return 1
fi
printf '%s' ":$PATH:" | grep -Fq ":$new:" || export PATH="$PATH:$new"
case ":$PATH:" in
(*":$new:"*) :;;
(*) export PATH="$PATH:$new";;
esac
}
# {{{1 configurations
@ -81,6 +84,7 @@ alias perlu='perl -Mopen=locale -Mutf8' ### @- invoke perl expecting files with
alias rgn="rg --no-ignore" ### @- invoke ripgrep without respecting `.gitignore` files.
alias cms="cryptominisat5 --verb 0" ### @- invoke cryptominisat5 with less noise.
alias curls="curl -sS" ### @- invoke curl with less noise.
alias curLs="curl -L --no-progress-meter"
# git {{{2

View File

@ -93,11 +93,12 @@ set ffs=unix,dos " prefer unix-style EOLs (ffs indeed)
set nobomb " don't mention these on planes
set undofile " remember undos across files/sessions
set diffopt+=iwhite " ignore whitespace in diff command
set ttimeoutlen=50 " make changing modes a bit snappier
set ttimeout ttimeoutlen=60 " make changing modes a bit snappier
set hidden " allow swapping out of unsaved buffers
set complete=.,w,b,u,t " don't scan every file with autocomplete
set nrformats=bin,hex,unsigned " ctrl+a/x non-negative numbers, no octal
if has('mksession')
set sessionoptions=blank,buffers,curdir,options,folds,tabpages,winsize,resize,winpos
set sessionoptions=blank,buffers,curdir,folds,tabpages,winsize,resize,winpos
end
if has('wildignore')
@ -312,7 +313,7 @@ nn <bar> <c-]>
" delete line
"nn D dd
" execute vim code in visual selection
" execute vim commands in visual selection
vmap <space> "xy:@x<cr>
" open a shell (only works if you `exec vim` instead of running it in a shell)
@ -365,7 +366,7 @@ let g:netrw_banner=0
let g:netrw_fastbrowse = 0 " so THAT'S what's been causing me agony
set background=dark
try | colorscheme property16 | catch /E185/ | colorscheme desert | endtry
try | colorscheme minimalist | catch /E185/ | colorscheme desert | endtry
" ctrlp {{{1
@ -376,5 +377,5 @@ let g:ctrlp_match_window='bottom,order:btt,min:1,max:24,results:24'
let s:hostname=hostname()
if s:hostname == "phantom-pi" || s:hostname == "wraith"
colorscheme Tomorrow-Night
colorscheme minimalist
endif

View File

@ -95,7 +95,7 @@ dirup() { ### @-
dirview() { ### @-
### use a fuzzy finder to select a recent directory in the directory stack
### and change to it without consuming the prompt.
local fuzzy="$(has fzy || print)"
local fuzzy="$(have fzy || print)"
print
if [ -n "$fuzzy" ]; then
local d="$(dirs -pl | awk '!seen[$0]++' | "$fuzzy")"