Files: 03e288c9b9e4d60e7d19ac8bd0cdaa7b052221ec / .bash_aliases
984 bytesRaw
1 | function langless() { |
2 | /var/guix/profiles/execline/bin/execlineb -c ' |
3 | importas -i language 1 |
4 | shift |
5 | elgetpositionals |
6 | pipeline -d { |
7 | piperw 3 4 |
8 | background { |
9 | fdmove 0 3 |
10 | fdmove 1 2 |
11 | grep -v "output left in -" |
12 | } |
13 | fdclose 3 |
14 | fdmove 2 4 |
15 | guix environment --ad-hoc enscript -- |
16 | enscript -E$language -wansi -o- $@ |
17 | } |
18 | less -R |
19 | ' "$@" |
20 | } |
21 | |
22 | alias pyless='langless python' |
23 | alias bashless='langless bash' |
24 | alias javaless='langless java' |
25 | alias cg='ccd ~/git' |
26 | |
27 | function ec() { |
28 | emacsclient --alternate-editor $(type -p emacs) -n "$@" &>/dev/null & |
29 | } |
30 | |
31 | function jsonless() { |
32 | python -m json.tool "$1" | langless javascript - |
33 | } |
34 | |
35 | function sudomy { |
36 | cmd="$(type -p "$1")" |
37 | shift |
38 | sudo "$cmd" "$@" |
39 | } |
40 | |
41 | function dockmy { |
42 | instance="$1" |
43 | cmd="$(readlink -e $(type -p "$2"))" |
44 | shift; shift |
45 | docker exec -it "$instance" /usr/bin/env TERM="$TERM" "$cmd" "$@" |
46 | } |
47 | |
48 | function ccd { |
49 | dir="$(readlink -e "$1")" |
50 | cd "$dir" |
51 | } |
52 |
Built with git-ssb-web