Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Csh/tcsh support and better error handling in preprocessing history #2

Merged
merged 3 commits into from
Dec 7, 2024

Conversation

nxjosephofficial
Copy link
Contributor

Made error handling better in function preprocessing_history by checking if file does exist before using cat to display it's contents, it's better now, we won't see "cat: no such file or directory" error anymore.

Added Csh/Tcsh shell support.

@nxjosephofficial
Copy link
Contributor Author

nxjosephofficial commented Dec 7, 2024

Script started on Sat Dec  7 18:35:31 2024
�[0;32myusuf�[1;31m@�[1;36mhale �[1;33m~/Documents/cliwrap �[0;37m%�[0m bash ./cliwrap -csh

�[0;36m
   _____ _      _____                        
  / ____| |    |_   _|                       
 | |    | |      | |_      ___ __ __ _ _ __  
 | |    | |      | \ \ /\ / / '__/ _` | '_ \ 
 | |____| |____ _| |\ V  V /| | | (_| | |_) |
  \_____|______|_____\_/\_/ |_|  \__,_| .__/ 
                                      | |    
                                      |_|    

�[0;32mParsing history file: /home/yusuf/.history�[0m


�[0;35mTop Tools�[0m
�[1;33m---------------------------------�[0m
�[0;36mUsage Count | Command�[0m
�[1;33m---------------------------------�[0m
 210 ls
 130 git
  67 sudo
  61 clear
  47 tmux
  47 cd
  42 edit
  39 pkg
  28 man
  20 rm
�[1;33m---------------------------------�[0m


�[0;35mTop Full Commands�[0m
�[1;33m---------------------------------�[0m
�[0;36mUsage Count | Command�[0m
�[1;33m---------------------------------�[0m
  47 tmux a
  41 sudo su
  34 git status
  14 edit example-config.yaml
  13 ./rssgen -config example-config.yaml
  10 git push codeberg
  10 git add .
   8 sudo reboot
   8 git push
   8 edit main.go
�[1;33m---------------------------------�[0m

�[0;32mTotal Commands Executed:     2000�[0m


Script started on Sat Dec  7 18:41:03 2024
�[0;32myusuf�[1;31m@�[1;36mhale �[1;33m~/Documents/cliwrap �[0;37m%�[0m ./��[K��[Kbash ./cliwrap -tcsh

�[0;36m
   _____ _      _____                        
  / ____| |    |_   _|                       
 | |    | |      | |_      ___ __ __ _ _ __  
 | |    | |      | \ \ /\ / / '__/ _` | '_ \ 
 | |____| |____ _| |\ V  V /| | | (_| | |_) |
  \_____|______|_____\_/\_/ |_|  \__,_| .__/ 
                                      | |    
                                      |_|    

�[0;32mParsing history file: /home/yusuf/.history�[0m


�[0;35mTop Tools�[0m
�[1;33m---------------------------------�[0m
�[0;36mUsage Count | Command�[0m
�[1;33m---------------------------------�[0m
 210 ls
 130 git
  67 sudo
  61 clear
  47 tmux
  47 cd
  42 edit
  39 pkg
  28 man
  20 rm
�[1;33m---------------------------------�[0m


�[0;35mTop Full Commands�[0m
�[1;33m---------------------------------�[0m
�[0;36mUsage Count | Command�[0m
�[1;33m---------------------------------�[0m
  47 tmux a
  41 sudo su
  34 git status
  14 edit example-config.yaml
  13 ./rssgen -config example-config.yaml
  10 git push codeberg
  10 git add .
   8 sudo reboot
   8 git push
   8 edit main.go
�[1;33m---------------------------------�[0m

�[0;32mTotal Commands Executed:     2000�[0m
�[0;32myusuf�[1;31m@�[1;36mhale �[1;33m~/Documents/cliwrap �[0;37m%�[0m exit

exit

Script done on Sat Dec  7 18:41:07 2024

@islemci islemci merged commit e98f54e into islemci:main Dec 7, 2024
Copy link
Contributor Author

@nxjosephofficial nxjosephofficial left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for catching it, it's better now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants