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:
parent
8b80993e78
commit
b3c7edb504
2
_lib.sh
2
_lib.sh
@ -44,7 +44,7 @@ deploy_configs() {
|
||||
echo "Deploying configuration files as symlinks..."
|
||||
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"
|
||||
done
|
||||
|
||||
|
||||
@ -179,6 +179,24 @@ xnspa() {
|
||||
-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() {
|
||||
local file candidates
|
||||
|
||||
|
||||
2
dotfiles/.visidatarc
Normal file
2
dotfiles/.visidatarc
Normal file
@ -0,0 +1,2 @@
|
||||
options.disp_float_fmt = '{:,.2f}'
|
||||
options.disp_int_fmt = '{:,}'
|
||||
Loading…
Reference in New Issue
Block a user