diff options
Diffstat (limited to '.bashrc')
-rw-r--r-- | .bashrc | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -81,7 +81,6 @@ alias chgrp='chgrp --preserve-root' # general aliases alias alsamixer='alsamixer --view all' alias archey3="archey3 --config=~/.config/archey3.cfg" -alias audacity='PULSE_LATENCY_MSEC=30 audacity' alias colortest='msgcat --color=test' alias dash='PS1="$ " dash' alias diceware='diceware -d " "' @@ -95,7 +94,6 @@ alias lsblk='lsblk -o NAME,MAJ:MIN,RM,SIZE,FSTYPE,RO,TYPE,MOUNTPOINT,MODEL' alias lxc-attach='lxc-attach --clear-env --name' alias lxc-ls='lxc-ls --fancy' alias lynx='lynx -cfg ~/.config/lynx/lynx.cfg' -alias mocp='mocp -M $XDG_CONFIG_HOME/moc' alias newsboat='newsboat -c $XDG_CONFIG_HOME/newsboat/cache.db -u $XDG_CONFIG_HOME/newsboat/urls -C $XDG_CONFIG_HOME/newsboat/config' alias nix-index='nix-index --db $XDG_DATA_HOME/nix-index' alias nix-locate='nix-locate --db $XDG_DATA_HOME/nix-index' @@ -106,7 +104,7 @@ alias tidy='tidy -config $HOME/.config/tidy.conf' alias units='units --history "$XDG_CACHE_HOME"/units_history' # nix helpers -nix-which() { readlink "$(type -P "$1")"; } +nix-which() { readlink --canonicalize "$(type -P "$1")"; } # lxc helpers lxc-copy() { A=$1 && B=$2 && shift 2 && $(type -P lxc-copy) --allowrunning --name "$A" -N "$B" "$@"; } @@ -125,10 +123,11 @@ docker-rootfs() { id=$(docker run --detach "$1" /bin/true) \ && docker container rm "$id" \ && ls -l rootfs.tar; } -# https://til.simonwillison.net/bash/escaping-a-string -# press ctrl+d after writing string to standard input +# press ctrl+d after writing string to standard input (https://til.simonwillison.net/bash/escaping-a-string) shellquote() { printf '%q\n' "$(cat)"; } -trap 'echo -ne "\033]2;command: $(history 1 | shellquote)\007"' DEBUG + +# show window title of last command (https://stackoverflow.com/a/5080670) +trap 'echo -ne "\033]2;term: $PWD $(history 1 | tr -s " " | cut -d " " -f 5-)\007"' DEBUG # swallow swallow() { "$@" & disown; exit; } |