bin: expand moul
This commit is contained in:
parent
0e37530ddd
commit
8f429a45ea
|
@ -16,7 +16,7 @@ tput setaf 4 && $elevate file -E "$last" | ( grep -v --color=never 'directory$'
|
|||
|
||||
case "$($elevate file --dereference --mime "$last")" in
|
||||
*inode/directory*) tput sgr0 && $(test -x "$last" || echo "sudo") ls -l --color=always --human-readable --group-directories-first --file-type --dereference-command-line --all "$@" | less -XF;;
|
||||
*binary) expr "$(file "$last")" : ".*compressed" >/dev/null && /usr/share/nvim/runtime/macros/less.sh "$@";;
|
||||
*binary) expr "$(file "$last")" : ".*: .*compress" >/dev/null && /usr/share/nvim/runtime/macros/less.sh "$@";;
|
||||
*) $elevate bat --style header "$@" "$(test -n "$elevate" || echo "--pager=less -XF")"
|
||||
tput setaf 3 && $elevate stat --format '%A size %sB, birth: %.10w mod %.10y' "$last"
|
||||
;;
|
||||
|
|
|
@ -33,6 +33,7 @@ fi
|
|||
|
||||
highlight "d to recursively remove development caches"
|
||||
if [[ $1 =~ "d" ]]; then
|
||||
rm -rf .npm .yarn
|
||||
find -name "src" -prune -o \
|
||||
-type d \( -name ".gradle" -o -name "generated" -o -name "dist-newstyle" -o -name "cache" -o -name "node_modules" -o -name "cmake_build" \) \
|
||||
-print -exec rm -r {} + -prune
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
#!/bin/sh
|
||||
# Mount a partition by label automatically
|
||||
sudo mount -o rw,X-mount.mkdir -L "$1" "${2:-/mnt/$1}"
|
||||
#!/bin/sh -e
|
||||
# Mount a partition by label or device identifier automatically
|
||||
#test "$1" = "-u" && umount "$mountpoint"; exit $?
|
||||
mountpoint="${2:-${XDG_RUNTIME_DIR:-/mnt}/$1}"
|
||||
case "$1" in (sd*|loop*) partition="/dev/$1";; (*) partition="-L $1";; esac
|
||||
mountpoint "$mountpoint" >/dev/null || sudo mount -v -o users,X-mount.mkdir $partition "$mountpoint" "${@:3}"
|
||||
cd $mountpoint
|
||||
exec $SHELL
|
||||
|
|
Loading…
Reference in New Issue