File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,10 @@ a c='clear'
4
4
a p=' pwd'
5
5
a e=' exit'
6
6
a q=' exit'
7
+
7
8
a h=' history | tail -20'
9
+ # turn off history, use 'set -o history' to turn it on again
10
+ a so=' set +o history'
8
11
9
12
a b1=' cd ../'
10
13
a b2=' cd ../../'
@@ -27,6 +30,11 @@ a s='du -sh * | sort -h'
27
30
# save last command from history to a file
28
31
# tip, add a comment to end of command before saving, ex: ls --color=auto # colored ls output
29
32
a sl=' fc -ln -1 | sed "s/^\s*//" >> ~/.saved_commands.txt'
33
+ # short-cut to grep that file
34
+ a slg=' < ~/.command_examples.txt grep'
35
+
36
+ # change ascii alphabets to unicode bold characters
37
+ a ascii2bold=" perl -Mopen=locale -Mutf8 -pe 'tr/a-zA-Z/𝗮-𝘇𝗔-𝗭/'"
30
38
31
39
# ## functions
32
40
# 'command help' for command name and single option - ex: ch ls -A
@@ -42,5 +50,5 @@ ap() { for f in "$@"; do echo "$PWD/$f"; done; }
42
50
o () { gnome-open " $@ " & > /dev/null ; }
43
51
44
52
# if unix2dos and dos2unix commands aren't available by default
45
- unix2dos () { perl -i -pe ' s|\n|\r\n| ' " $@ " ; }
46
- dos2unix () { perl -i -pe ' s|\r\n|\n| ' " $@ " ; }
53
+ unix2dos () { sed -i ' s/$/\r/ ' " $@ " ; }
54
+ dos2unix () { sed -i ' s/\r$// ' " $@ " ; }
You can’t perform that action at this time.
0 commit comments