mirror of
https://codeberg.org/vlw/dotfiles.git
synced 2025-09-14 03:03:42 +02:00
Compare commits
No commits in common. "7c9edd63347e104ac281b0ac5ea29e97f2200798" and "c6f7cbad09789fe2bf1b3ae376e515664745a1cd" have entirely different histories.
7c9edd6334
...
c6f7cbad09
1 changed files with 11 additions and 36 deletions
|
@ -1,48 +1,23 @@
|
||||||
# Make dir and cd into it
|
# Make dir and cd into it
|
||||||
mkcdir () {
|
mkcdir () {
|
||||||
mkdir -p -- "$1" && cd -P -- "$1"
|
mkdir -p -- "$1" &&
|
||||||
|
cd -P -- "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Preview contents of a file or list the contents of a directory
|
# ls -la
|
||||||
l () {
|
alias l="ls -lh"
|
||||||
if [ -f "$1" ] ; then
|
alias ll="ls -lah"
|
||||||
less $1
|
alias lll="ls -lah | less"
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
ls -lh $1 || l $(dirname "$1")
|
|
||||||
}
|
|
||||||
|
|
||||||
# Preview the contents of a file or list the contents of a directory with hidden files shown
|
|
||||||
ll () {
|
|
||||||
if [ -f "$1" ] ; then
|
|
||||||
less $1
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
ls -lah $1 || ll $(dirname "$1")
|
|
||||||
}
|
|
||||||
|
|
||||||
# Edit the contents of a file or list the contents of a directory (with hidden files shown) if that file is not found
|
|
||||||
lll () {
|
|
||||||
if [ -f "$1" ] ; then
|
|
||||||
nano $1
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
ls -lah $1 || lll $(dirname "$1")
|
|
||||||
}
|
|
||||||
|
|
||||||
.. () {
|
|
||||||
cd .. && l
|
|
||||||
}
|
|
||||||
|
|
||||||
|
# cd +
|
||||||
cdl () {
|
cdl () {
|
||||||
cd -P -- "$1" && l
|
cd -P -- "$1" &&
|
||||||
|
l
|
||||||
}
|
}
|
||||||
|
|
||||||
cdll () {
|
cdll () {
|
||||||
cp -P -- "$1" && ll
|
cp -P -- "$1" &&
|
||||||
|
ll
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create standard git WIP commit with timestamps
|
# Create standard git WIP commit with timestamps
|
||||||
|
|
Loading…
Add table
Reference in a new issue