mirror of
https://codeberg.org/vlw/dotfiles.git
synced 2025-09-13 19:03:40 +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
|
||||
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
|
||||
l () {
|
||||
if [ -f "$1" ] ; then
|
||||
less $1
|
||||
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
|
||||
}
|
||||
# ls -la
|
||||
alias l="ls -lh"
|
||||
alias ll="ls -lah"
|
||||
alias lll="ls -lah | less"
|
||||
|
||||
# cd +
|
||||
cdl () {
|
||||
cd -P -- "$1" && l
|
||||
cd -P -- "$1" &&
|
||||
l
|
||||
}
|
||||
|
||||
cdll () {
|
||||
cp -P -- "$1" && ll
|
||||
cp -P -- "$1" &&
|
||||
ll
|
||||
}
|
||||
|
||||
# Create standard git WIP commit with timestamps
|
||||
|
|
Loading…
Add table
Reference in a new issue