From 4a1ef143c04a73c297b2acfa0e7cdf8209f7ca3b Mon Sep 17 00:00:00 2001 From: q3aql Date: Thu, 14 Jul 2022 00:55:03 +0200 Subject: [PATCH] Fix names with '/' character (dmenu_drun) --- dmenu_drun | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dmenu_drun b/dmenu_drun index a4a7c52..ad3abfa 100755 --- a/dmenu_drun +++ b/dmenu_drun @@ -69,13 +69,13 @@ function create_list_files() { rm -rf ${load_desktop_files}/* list_desktop_files | while read current_file ; do if [ -f "${desktop_files}/${current_file}" ] ; then - name_show=$(cat "${desktop_files}/${current_file}" | grep "Name=" | head -1 | cut -d "=" -f 2 | sed 's/\//\\\\/g') + name_show=$(cat "${desktop_files}/${current_file}" | grep "Name=" | head -1 | cut -d "=" -f 2 | sed 's/\//|/g') if [ ! -z "${name_show}" ] ; then echo "${desktop_files}/${current_file}" > "${load_desktop_files}/${name_show}" fi fi if [ -f "${desktop_files_home}/${current_file}" ] ; then - name_show=$(cat "${desktop_files_home}/${current_file}" | grep "Name=" | head -1 | cut -d "=" -f 2 | sed 's/\//\\\\/g') + name_show=$(cat "${desktop_files_home}/${current_file}" | grep "Name=" | head -1 | cut -d "=" -f 2 | sed 's/\//|/g') if [ ! -z "${name_show}" ] ; then echo "${desktop_files_home}/${current_file}" > "${load_desktop_files}/${name_show}" fi