add xnd (duckdb→vd), visidatarc with comma formatting

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Paul Trowbridge 2026-05-30 23:27:06 -04:00
parent 8b80993e78
commit b3c7edb504
3 changed files with 21 additions and 1 deletions

View File

@ -44,7 +44,7 @@ deploy_configs() {
echo "Deploying configuration files as symlinks..." echo "Deploying configuration files as symlinks..."
local config_dir="$SCRIPT_DIR/dotfiles" local config_dir="$SCRIPT_DIR/dotfiles"
for config in .bashrc .vimrc .gitconfig .pspgconf .psqlrc .tmux.conf; do for config in .bashrc .vimrc .gitconfig .pspgconf .psqlrc .tmux.conf .visidatarc; do
create_symlink "$config_dir/$config" ~/"$config" create_symlink "$config_dir/$config" ~/"$config"
done done

View File

@ -179,6 +179,24 @@ xnspa() {
-f "$file" | vd -f csv - -f "$file" | vd -f csv -
} }
xnd() {
local file
file=$(
lsof +D ~/.local/state/nvim/swap/ 2>/dev/null | grep -v 'lsof:' |
grep -o "/swap/.*" |
sed 's|^/swap/||' |
tr "%" "/" |
sed -E 's/\.sw[op]$//' |
grep "$(pwd | sed 's|^//|/|')" |
fzf
) || return
[[ -z "$file" ]] && return
duckdb -csv /opt/sync/osm_stack.duckdb < "$file" | vd -f csv -
}
xndb2() { xndb2() {
local file candidates local file candidates

2
dotfiles/.visidatarc Normal file
View File

@ -0,0 +1,2 @@
options.disp_float_fmt = '{:,.2f}'
options.disp_int_fmt = '{:,}'