File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,10 @@ a c='clear'
44a p=' pwd'
55a e=' exit'
66a q=' exit'
7+
78a h=' history | tail -20'
9+ # turn off history, use 'set -o history' to turn it on again
10+ a so=' set +o history'
811
912a b1=' cd ../'
1013a b2=' cd ../../'
@@ -27,6 +30,11 @@ a s='du -sh * | sort -h'
2730# save last command from history to a file
2831# tip, add a comment to end of command before saving, ex: ls --color=auto # colored ls output
2932a 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/𝗮-𝘇𝗔-𝗭/'"
3038
3139# ## functions
3240# '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; }
4250o () { gnome-open " $@ " & > /dev/null ; }
4351
4452# 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