Crates.io | xquo |
lib.rs | xquo |
version | 0.2.1 |
source | src |
created_at | 2022-07-20 17:52:23.14616 |
updated_at | 2023-07-04 04:37:36.450704 |
description | Quote null splited lines for Bash command line |
homepage | |
repository | https://github.com/hankei6km/xquo |
max_upload_size | |
id | 628996 |
size | 40,044 |
Command line utility to quote null splited lines for Bash command line.
cargo
$ cargo install xquo
cargo
with jemalloc
featureAs far as I tried, it could be built in Ubuntu(x86_64-unknown-linux-musl
) and Apine(x86_64-unknown-linux-gnu
).
$ cargo install xquo --features jemalloc
https://github.com/hankei6km/xquo/releases
A file name containing lf
character exists.
$ ls
'123'$'\n''abc.txt' '123 abc.txt' '123"abc.txt' "123'abc.txt" abc.txt
$ find . -type f -exec echo ={}= \;
=./123
abc.txt=
=./123'abc.txt=
=./abc.txt=
=./123 abc.txt=
=./123"abc.txt=
Import the file list as a command line into the editor(ie. Vim).
$ find . -type f -print0 | xquo | vim "+%s/^/ls -l /" -
ls -l './123'$'\n''abc.txt'
ls -l './123'"'"'abc.txt'
ls -l './abc.txt'
ls -l './123 abc.txt'
ls -l './123"abc.txt'
These can access a file correctly.
:w !bash
-rw-r--r-- 1 vscode vscode 0 Jul 8 15:46 './123'$'\n''abc.txt'
-rw-r--r-- 1 vscode vscode 0 Jul 8 15:46 "./123'abc.txt"
-rw-r--r-- 1 vscode vscode 0 Jul 8 15:46 ./abc.txt
-rw-r--r-- 1 vscode vscode 0 Jul 8 15:46 './123 abc.txt'
-rw-r--r-- 1 vscode vscode 0 Jul 8 15:46 './123"abc.txt'
Press ENTER or type command to continue
MIT License
Copyright (c) 2022 hankei6km