Make ds an alias for dropshell!

This commit is contained in:
Your Name 2025-04-25 22:06:51 +12:00
parent 5d7a22794d
commit 63144032c1
2 changed files with 22 additions and 1 deletions

View File

@ -51,12 +51,32 @@ install(TARGETS dropshell
RUNTIME DESTINATION bin RUNTIME DESTINATION bin
) )
# Create symbolic link 'ds' pointing to 'dropshell'
install(CODE "
message(STATUS \"Creating symlink: ds -> dropshell\")
execute_process(
COMMAND ${CMAKE_COMMAND} -E create_symlink
\${CMAKE_INSTALL_PREFIX}/bin/dropshell
\${CMAKE_INSTALL_PREFIX}/bin/ds
)
")
# Install completion script # Install completion script
install(FILES src/dropshell-completion.bash install(FILES src/dropshell-completion.bash
DESTINATION /etc/bash_completion.d DESTINATION /etc/bash_completion.d
RENAME dropshell RENAME dropshell
) )
# Create a symlink for the completion script to work with 'ds' command
install(CODE "
message(STATUS \"Creating completion script symlink for 'ds'\")
execute_process(
COMMAND ${CMAKE_COMMAND} -E create_symlink
/etc/bash_completion.d/dropshell
/etc/bash_completion.d/ds
)
")
# Create pre-install script to clean old templates # Create pre-install script to clean old templates
install(CODE " install(CODE "
message(STATUS \"Removing old template files...\") message(STATUS \"Removing old template files...\")

View File

@ -49,3 +49,4 @@ _dropshell_completions() {
# Register the completion function # Register the completion function
complete -F _dropshell_completions dropshell complete -F _dropshell_completions dropshell
complete -F _dropshell_completions ds