File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ alias .....='cd ../../../..'
77
88# General
99
10- alias c=' cd'
1110alias l=' ls -lhA --group-directories-first'
1211alias s=' systemctl'
1312alias grep=' grep --color=auto'
@@ -56,8 +55,6 @@ backport() {
5655
5756# Functions
5857
59- cdir () { mkdir " $1 " && cd " $1 " ; }
60-
6158extract () {
6259 if [ -f " $1 " ] ; then
6360 case " $1 " in
@@ -79,10 +76,21 @@ exe() {
7976 docker exec -it " $( docker ps -qf name=$1 ) " /bin/bash
8077}
8178
79+ c () {
80+ [ -z " $1 " ] && { cd ; return ; }
81+ [ -d " $1 " ] && { cd " $1 " ; return ; } ||
82+ [ -f " $1 " ] && file -b " $1 " | grep -q -e " text" -e " empty" && { cat " $1 " ; return ; } ||
83+ file " $1 "
84+ }
85+
8286j () {
8387 journalctl -xe --no-pager -u " $1 " || journalctl -xe --no-pager
8488}
8589
90+ m () {
91+ mkdir " $1 " && cd " $1 " ;
92+ }
93+
8694package () {
8795 local project
8896 project=$( basename " $PWD " )
You can’t perform that action at this time.
0 commit comments