Update README.md and begin adding a fish shell autocompletion script.

This commit is contained in:
Username404-59 2021-02-26 14:22:12 +01:00
parent 20907ad833
commit 580500ada9
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
4 changed files with 14 additions and 3 deletions

View File

@ -55,7 +55,8 @@ if (UNIX AND NOT MINGW)
if (NOT DEFINED CPACK_GENERATOR)
set(CPACK_GENERATOR TGZ;STGZ;RPM;DEB)
endif()
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/scripts/bash-completion.sh DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/ybcon.d)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/scripts/bash-completion.sh ${CMAKE_CURRENT_SOURCE_DIR}/scripts/fish-completion.fish
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/ybcon.d)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ybcon ${CMAKE_CURRENT_SOURCE_DIR}/scripts/ybcon.sh
PERMISSIONS
OWNER_WRITE

View File

@ -7,7 +7,7 @@ Aka Yer Bacon,
- #### A language that transpiles into lua, javascript or python code.
Here's how the "hello world" will look like.
Here's how the basic "hello world" script will look like.
```
main #= [] -> {
println "Hello, World!"

View File

@ -0,0 +1 @@
set -l commands --help -p --printresult

View File

@ -4,7 +4,16 @@
ln -sf /opt/bin/ybcon.sh /usr/bin/ybcon
ybconDir="/opt/etc/ybcon.d"
fishLoc="/usr/share/fish/vendor_completions.d"
bashcompleteLoc="/etc/bash_completion.d"
if [ -d $bashcompleteLoc ]; then
ln -sf /opt/etc/ybcon.d/bash-completion.sh "$bashcompleteLoc/ybcon.sh"
ln -sf "$ybconDir/bash-completion.sh" "$bashcompleteLoc/ybcon.sh"
fi
if [ -f "fish" ]; then
if [ ! -d $fishLoc ]; then
mkdir "$fishLoc"
fi
ln -sf "$ybconDir/fish-completion.fish" "$fishLoc/ybcon.fish"
fi