Verified Commit f49253cc authored by AtjonTV's avatar AtjonTV
Browse files

Prompt: Rewrite pt to print a nice text followed by filename (if nice text...

Prompt: Rewrite pt to print a nice text followed by filename (if nice text exists, else its only filename)
parent 4b3530e2
......@@ -18,14 +18,17 @@ function get_tags_list
set -e shorts
set -e longs
set -e lower_case_count
set -e longs_help
# First set of lowercase Tags; Max of 10 per line
set -g shorts $shorts c d e g i k m n r s
set -g longs $longs CMakeLists.txt Dockerfile .project build.gradle .idea .kdev4 Makefile build.ninja requirements.txt shipitfile.js
set -g longs_help $longs_help CMake x Eclipse Gradle IntelliJ KDevelop x Ninja Python x
# Second set of lowercase Tags
set -g shorts $shorts p
set -g longs $longs pom.xml
set -g longs_help $longs_help Maven
# Count of lowercase tags
set -g lower_case_count (count $shorts)
......@@ -33,6 +36,7 @@ function get_tags_list
# First set of UPPERCASE Tags
set -g shorts $shorts C D G K M N P
set -g longs $longs composer.json docker-compose.yml Gemfile build.gradle.kts meson.build package.json pubspec.yaml
set -g longs_help $longs_help PHP x Ruby Gradle Meson NodeJS Flutter
end
function detect_tags
......@@ -62,12 +66,21 @@ function prompt_tags
for i in (seq $c)
set f $longs[$i]
set t $shorts[$i]
set h $longs_help[$i]
if [ "$h" = "x" ]
set h ""
else
set x "$h"
set h "\t\t\t($f)"
set f "$x"
end
if contains $t $tags_list
set_color green
end
echo " $t -> $f"
printf " $t -> $f$h\n"
set_color white
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment