diff options
author | Kirill Isakov | 2023-12-10 13:50:29 +0600 |
---|---|---|
committer | Kirill Isakov | 2023-12-10 13:50:29 +0600 |
commit | b6dacc224000e0d9be3abfb404488467a61833fd (patch) | |
tree | 0b492ba2ea8adb772d61a522be8e1de8a123db23 | |
parent | 0859b3afab232c124127decd9d6215aa6e5a2b56 (diff) | |
download | aur-b6dacc224000e0d9be3abfb404488467a61833fd.tar.gz |
xcp: add completions for the fish shell
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 14 | ||||
-rw-r--r-- | xcp.fish | 21 |
4 files changed, 35 insertions, 5 deletions
@@ -1,7 +1,7 @@ pkgbase = xcp pkgdesc = An extended 'cp' pkgver = 0.13.0 - pkgrel = 1 + pkgrel = 2 url = https://github.com/tarka/xcp arch = i686 arch = x86_64 @@ -13,7 +13,9 @@ pkgbase = xcp depends = gcc-libs source = xcp-0.13.0.tar.gz::https://github.com/tarka/xcp/archive/v0.13.0.tar.gz source = xcp.bash + source = xcp.fish sha512sums = 8471eebdec9f2a18c0c8d2be14ca379ff7f6701a415356823570200fc4abc1355cd712eefa228063eec69de0a1ae6cc5022db9a800a6d1a67f62f708953cf597 sha512sums = 67d2569086ac2d35f60fedb4d413a95c3af90e3c5dac56f803cdbeb68785f8ee70d18cb3c3f0dfd96bb16741fdc5f3ec6c39583a2611ab9f3d49f27f227109b8 + sha512sums = 2c4d671d8c976e9936b9abd710eb4f26a8ed901d9e0e585caeb10c855fccac4516d5f1460bfa9c0f9ee3b0e84c3009c99a4463ec594f605d7fb615cdcb240080 pkgname = xcp diff --git a/.gitignore b/.gitignore index 8d2d51f1ca5a..150cf438750e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,6 @@ !.gitignore !.SRCINFO !xcp.bash +!xcp.fish !PKGBUILD @@ -3,16 +3,19 @@ pkgname='xcp' pkgver='0.13.0' -pkgrel=1 +pkgrel=2 pkgdesc="An extended 'cp'" arch=('i686' 'x86_64' 'armv7h' 'aarch64') url='https://github.com/tarka/xcp' license=('GPL3') depends=('glibc' 'gcc-libs') makedepends=('cargo') -source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz" xcp.bash) +source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz" + xcp.bash + xcp.fish) sha512sums=('8471eebdec9f2a18c0c8d2be14ca379ff7f6701a415356823570200fc4abc1355cd712eefa228063eec69de0a1ae6cc5022db9a800a6d1a67f62f708953cf597' - '67d2569086ac2d35f60fedb4d413a95c3af90e3c5dac56f803cdbeb68785f8ee70d18cb3c3f0dfd96bb16741fdc5f3ec6c39583a2611ab9f3d49f27f227109b8') + '67d2569086ac2d35f60fedb4d413a95c3af90e3c5dac56f803cdbeb68785f8ee70d18cb3c3f0dfd96bb16741fdc5f3ec6c39583a2611ab9f3d49f27f227109b8' + '2c4d671d8c976e9936b9abd710eb4f26a8ed901d9e0e585caeb10c855fccac4516d5f1460bfa9c0f9ee3b0e84c3009c99a4463ec594f605d7fb615cdcb240080') build() { cd $pkgname-$pkgver @@ -25,6 +28,9 @@ check() { } package() { - install -Dm644 "$srcdir/$pkgname.bash" "$pkgdir/usr/share/bash-completion/completions/$pkgname" install -Dm755 "$pkgname-$pkgver/target/release/$pkgname" "$pkgdir/usr/bin/$pkgname" + + # completions + install -Dm644 "$srcdir/$pkgname.bash" "$pkgdir/usr/share/bash-completion/completions/$pkgname" + install -Dm644 "$srcdir/$pkgname.fish" "$pkgdir/usr/share/fish/completions/$pkgname.fish" } diff --git a/xcp.fish b/xcp.fish new file mode 100644 index 000000000000..917a08c36623 --- /dev/null +++ b/xcp.fish @@ -0,0 +1,21 @@ +# https://fishshell.com/docs/current/completions.html + +# short + long, no arguments +complete -c xcp -s T -l no-target-directory -d 'Overwrite target directory, do not create a subdirectory' +complete -c xcp -s g -l glob -d 'Expand filename patterns' +complete -c xcp -s h -l help -d 'Print help' +complete -c xcp -s n -l no-clobber -d 'Do not overwrite an existing file' +complete -c xcp -s r -l recursive -d 'Copy directories recursively' +complete -c xcp -s v -l verbose -d 'Increase verbosity' + +# long, no arguments +complete -c xcp -l fsync -d 'Sync each file to disk after it is written' +complete -c xcp -l gitignore -d 'Use .gitignore if present' +complete -c xcp -l no-perms -d 'Do not copy file permissions' +complete -c xcp -l no-progress -d 'Disable progress bar' + +# with arguments +complete -c xcp -x -s w -l workers -a '0 1 2 4 8 16 32' -d 'Workers for recursive copies (≤0 means use number of CPUs)' +complete -c xcp -x -l block-size -a '(seq 1 16){K,M,G}' -d 'Block size for file operations' +complete -c xcp -x -l driver -a 'parfile parblock' -d 'Parallelize at the file or at the block level' + |